SearchQueryResults
org.sagebionetworks.repo.model.search.SearchQueryResults
Results of a search query against an OpenSearch index. The set of populated fields is governed by the request's responseParts: hits and offset are populated by default; the remaining fields are populated only when the corresponding SearchQueryPart is requested.
| Field | Type | Description |
|---|---|---|
| concreteType | STRING | |
| hits | ARRAY<SearchHit> | Matching documents. Populated by default (or whenever SearchQueryPart.HITS is requested). |
| totalHits | INTEGER | The total number of matching documents. Populated when SearchQueryPart.TOTAL_HITS is requested. |
| selectColumns | ARRAY<SelectColumn> | The columns represented in each hit's fields, in SELECT-clause order. Populated when SearchQueryPart.SELECT_COLUMNS is requested. When body._source.includes is non-empty, this is the subset of columns matching those names. |
| aggregationResults | OBJECT | The raw OpenSearch aggregations response — the contents of the aggregations key returned by AOSS, with field references rewritten back to column names. Populated whenever the request supplied body.aggregations; not gated by SearchQueryPart. Returned as an opaque JSON object because the OpenSearch DSL produces a wide variety of bucket shapes per aggregation type and per sub-aggregation. |
| nextSearchAfter | ARRAY<OBJECT> | Opaque cursor for the next page. Populated whenever the response carries hits and the underlying sort yielded sort values for the last hit. Pass back unchanged on the next request as body.search_after. Null when there are no further pages. |
| offset | INTEGER | Zero-based pagination offset echoed from the request. Always populated. |