SearchResultGroup

This object is the data type of the content array of groups. It represents a "group" of search results.

Search results are generally grouped by their DITA map context. That is, a DITA topic used in multiple DITA map contexts will have its matching search results grouped together. No other documents are grouped in this way.

nContexts will always be >= 1 and equal to results?size . firstResult will be the same SearchResultDocument as results[0] .

Properties

SearchResultDocument firstResult
convenience variable for results[0] .
String groupingValue
The value of the grouping field specified by the query for all of the documents in this group. For example, grouped search results are grouped by the "itemKey" property by default, so this value will be the itemKey of all of the results in this group. When grouping by another field, this will be the value for that field on all of the documents in this group. Introduced in version 4.2.1.
int nContexts
The size of the results array. The value will always be >= 1.
SearchResultDocument[] results
The search results grouped by topic. If the topic was returned by a search result, then each context in which it exists will be present in the array. If the document is stand-alone, (that is, it is not referenced by any parent document) then there will be only one entry in the array. results?size will always be equal to nContexts .