Set Up Search Integration

How to query search, request suggestions, and trigger indexing flows where needed.

Use the search endpoints when you need one search box across locations, documents, and indexed document text.

Query Suggestions

Call POST /v1/search/suggestions with the current partial term:

{
  "term": "inspection rep",
  "scope": {
    "includeShared": true
  }
}

Use the returned suggestion list to drive autocomplete UI while typing.

Call POST /v1/search with the final term:

{
  "term": "inspection report retaining wall",
  "scope": {
    "includeShared": true
  }
}

Render each result using:

  • searchId from the top-level response for later telemetry
  • title as the primary label
  • subtitle as secondary context
  • snippet as the preview excerpt
  • source.pageNumber and source.chunkIndex when you want to show where a document preview came from

Handle Result Types

Common result types:

  • Document
  • DocumentContent
  • Location
  • Cluster
  • SpatialMetadata

Recommended UI behavior:

  • show document previews inline when snippet is present
  • show page context when source.pageNumber is set
  • treat DocumentContent results as deep links into a document preview surface
  • treat Document results as the parent document card, optionally with preview text

Report Interactions

After rendering results, keep the returned searchId and send follow-up interactions to POST /v1/search/interactions.

Example payload:

{
  "searchId": "4d20d178-22ce-4df2-a7ae-4ef2b4d92f89",
  "resultId": "document:8cfcbca40b3646f8a01f603fd1ae0677",
  "action": "DocumentOpen",
  "resultType": "Document",
  "rankPosition": 2,
  "dwellMilliseconds": 1800
}

Use action: "QueryReformulated" with reformulatedTerm when the user changes the search after seeing the results.

Trigger Indexing

Admin users can control indexing with:

  • POST /v1/search/index/documents/{documentId} to reindex one document
  • POST /v1/search/index/backfill to queue a full backfill
  • POST /v1/search/index/assets/backfill to rebuild the asset index
  • GET /v1/search/index/status to inspect indexing task status

If a document is missing from search after upload or reprocessing, reindex that document first. Use the backfill endpoint when rolling out search to an existing corpus.

On this page