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

NameTypeDescription
tsnumberTime at which the Sitecore server served the response, in milliseconds.
dtnumberResponse processing time in milliseconds.
widgetsArrayDepends on request.

SearchResponseWidget type

NameTypeDescription
rfk_idstringrfk_id of the widget in the response.
typeWidgetDataTypeEnumerator.

WidgetDataType.RECOMMENDATION, WidgetDataType.PREVIEW_SEARCH, WidgetDataType.SEARCH_RESULTS, WidgetDataType.CONTENT_BLOCK, WidgetDataType.QUESTIONS, WidgetDataType.HTML_BLOCK,    WidgetDataType.BANNER, and WidgetDataType.SEO
answerSearchResponseAnswer
contentArrayEntity 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.
entityEntityThe entity type of this widget response.
facetArrayList of facets. You see this only if you pass a facet object in the request.
limitnumberMaximum number of items you requested.
offsetnumberOffset applied to the request. You see this only if you pass an offset object in the request.
related_questionsArrayList of related_questions object.
rfk_debugRecord<string, any>Debug information for this request.
ruleSearchResponseRuleContains the rules applied in the response.
sortSearchResponseSortContains the sorting information you requested. You see this only if you pass a sort object in the request.
suggestionRecord< string, Array >List of suggestions for the key phrase. You see this only if you pass a suggestions object in the request.
total_itemnumberTotal number of content items that match the request.
appearanceSearchResponseAppearanceDepends 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.

Tip

For more information, see the node_modules\@sitecore_search folder.

If you have suggestions for improving this article, let us know!