The Open API specification for Synapse is now available for download!

Download Open API Spec

POST /search/query/async/start

Start an asynchronous search query job against a SearchIndex.

The request wraps a SearchQuery — see that schema for the full set of available knobs. Highlights:

  • queryType — the full-text query model. See SearchQueryType for the per-type explanation of scoring, accepted parameters, and when to use each. Default is SIMPLE_QUERY_STRING. An empty or null queryText automatically selects MATCH_ALL.
  • queryFields — restrict the search to specific columns, with optional per-field boost using column^N syntax (e.g. "title^3"). Empty means all indexed fields.
  • FilterstermsFilters, rangeFilters, existsFilters, and notExistsFilters narrow the result set. All filters run in non-scoring context (yes/no matching, cacheable) — they do not contribute to relevance.
  • FacetsfacetRequests produce bucket aggregations per column. Sort by COUNT or KEY in either direction; cap each facet with maxValueCount.
  • Response tuningreturnFields, sort (including the special _score pseudo-column), offset, limit (capped at 100), and highlight.

Results are returned as a SearchQueryResults. Use GET /search/query/async/get/{asyncToken} to poll for results — while the job is running the GET returns HTTP 202 with a AsynchronousJobStatus.

The caller must have READ access to the source table or view that backs the SearchIndex. Row-level access is enforced automatically: rows the caller cannot read are filtered out of the results before they leave the server.

Resource URL

https://repo-prod.prod.sagebase.org/repo/v1/search/query/async/start

Resource Information
Authentication Required
Required OAuth Scopes view
HTTP Method POST
Request Object SearchIndexQuery
(application/json)
Response Object AsyncJobId
(application/json)