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.
Run A Search
Call POST /v1/search with the final term:
{
"term": "inspection report retaining wall",
"scope": {
"includeShared": true
}
}Render each result using:
searchIdfrom the top-level response for later telemetrytitleas the primary labelsubtitleas secondary contextsnippetas the preview excerptsource.pageNumberandsource.chunkIndexwhen you want to show where a document preview came from
Handle Result Types
Common result types:
DocumentDocumentContentLocationClusterSpatialMetadata
Recommended UI behavior:
- show document previews inline when
snippetis present - show page context when
source.pageNumberis set - treat
DocumentContentresults as deep links into a document preview surface - treat
Documentresults 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 documentPOST /v1/search/index/backfillto queue a full backfillPOST /v1/search/index/assets/backfillto rebuild the asset indexGET /v1/search/index/statusto 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.