Search Response
In Sitecore Search, all search responses are SearchResponse objects. This topic describes some response objects. After you have installed the JS Data package in your project, these methods and their documentation will be available in your IDE.
SearchResponse type
|
Name |
Type |
Description |
|---|---|---|
|
|
number |
Time at which the Sitecore server served the response, in milliseconds. |
|
|
number |
Response processing time in milliseconds. |
|
|
Array<SearchResponseWidget> |
Depends on request. |
SearchResponseWidget type
|
Name |
Type |
Description |
|---|---|---|
|
|
string |
|
|
|
WidgetDataType |
Enumerator.
|
|
|
SearchResponseAnswer | |
|
|
Array<T> |
Entity items are available in an array with the entity name. T extends the entity model. List of Content entity items. You only see this if you pass a content object in the request. |
|
|
Entity |
The entity type of this widget response. |
|
|
Array<SearchResponseFacet> |
List of facets. You see this only if you pass a |
|
|
number |
Maximum number of items you requested. |
|
|
number |
Offset applied to the request. You see this only if you pass an |
|
|
Array<SearchResponseAnswer> |
List of |
|
|
Record<string, any> |
Debug information for this request. |
|
|
SearchResponseRule |
Contains the rules applied in the response. |
|
|
SearchResponseSort |
Contains the sorting information you requested. You see this only if you pass a |
|
|
Record< string, Array<SearchResponseSuggestion> > |
List of suggestions for the key phrase. You see this only if you pass a |
|
|
number |
Total number of content items that match the request. |
|
|
SearchResponseAppearance |
Depends on WidgetDataType. |
Using a SearchResponseWidget object
All search responses from Sitecore Search include an array of SearchResponseWidget objects. The structure of each of these objects is dynamic, because it's based on the query and available results.
For more information, see the node_modules\@sitecore_search folder.