SearchResult
Search Result🔗
Description🔗
The SearchResult object combines all search result information in a single data structure. Many fields of the SearchResult object can remain empty, depending on the SearchRequest. Search results contain chiefly:
- the query result as a list of retrieved document metadata,
- facet item counts,
- parsed query parts generated from the query,
- synonyms object holding related terms and spelling variants for recognised query part items.
Upon the initial query the SearchResult also contains static metadata that defines the configuration of the search environment, such as facets.
Furthermore, warnings and notices are passed back to the GUI with the search results.
Fields🔗
Parameter Name | Type | Description |
---|---|---|
matchSize | integer | total number of results found by the searcher (can differ from the number of returned items) |
hasMoreResults | boolean | whether there are more result items for this query that did not fit in the response (more can be requested using the resultOffset request parameter). |
resultItems | list of ResultItem | actual list of result items |
queryParts | list of QueryPart | all query parts of the executed query. They are aligned in order with the query part scores contained in the ResultItems. |
newQueryParts | list of QueryPart | result of parsing the query. Thus containing only the new query parts. |
isOrCombined | boolean | flag indicating that the new query part has been OR combined with a query part in the given queryParts (so that the API-client must do the same). |
facetCounts | list of Facet | all facets (including facets of type "cloud", when given as provideTagcloud in the SearchRequest) with their items and counts (other facet configuration information sent by getMetadata requests is omitted here). |
searchEngine | string | the name of the searcher that has been used to process the request |
synonyms | map of string to list of SynonymSection | map of the compound key "Field name:Query Part Item value" to the list of Synonym objects for the recognized query part items |
transformedQuery | string | transformed query, as sent to the underlying searcher. Returned only if AccessOptions.transformedQueryAccess was set to true when authenticating. |
warning | list of string | List of warning messages. The field is optional and returned only if external searcher response contains warning message. |
queryContext | QueryContext | Optional. Stores additional information about the query. |
searchAfter | list of string | List of elastic search sort values that is used for pagination. Only filled with elastic search searchers. |
suggestedScoreThreshold | float | Suggested score threshold to filter out possibly bad results, only provided if bi-metric scoring is enabled. |
Example🔗
{
"matchSize": 441,
"hasMoreResults": true,
"resultItems": [...],
"queryParts": [...],
"newQueryParts": [...],
"isOrCombined": false,
"facetCounts": [...],
"synonyms": { "skill:java": [...] },
"searchEngine": "internal",
"warning": [...],
"queryContext": {...},
"searchAfter": [...]
}