SearchWidgetItem
|
Type |
Class |
|
Extends |
|
|
Import path |
|
A widget item for a search widget.
Constructor
Parameters
|
Name |
Type |
Description |
|---|---|---|
|
|
|
Required. The entity associated with the widget. |
|
|
|
Required. The unique identifier of the widget. To find the widget IDwidget ID in Sitecore Search, click Widgets. Widget IDs are in the RFK ID column. Example: |
|
|
Optional. Options for the search widget item object. Extends | |
|
|
|
Optional. A list of sourcesource IDs that identify the sources to include results from. Useful for filtering results by source, for example, when managing multiple sites. To find source IDs in Sitecore Search, on the menu bar, click Sources. If set, the response will contain results only from the specified sources. If unset, the response will return results from all sources. Example: Minimum length: 1. |
Properties
|
Name |
Type |
Description |
|---|---|---|
|
|
The facet object of the search widget item. Contains facet settings for the search request. For example, how many individual facets to retrieve and in what order. | |
|
|
The query object of the search widget item. Settings related to the site visitor's search query. | |
|
|
|
The number of items to skip in the results that are returned. |
|
|
Sorting configuration for search results. | |
|
|
The suggestion parameter of the search widget item. Used to configure search suggestions. Minimum: | |
|
|
The ranking parameter of the search widget item. Used to configure search result ranking. Minimum: | |
|
|
Options for personalizing search results. |
Accessors
The following properties are available to set:
get facet
Returns the facet property of the SearchWidgetItem instance.
set facet
Sets the facet property of the SearchWidgetItem instance.
Parameters
|
Name |
Type |
Description |
|---|---|---|
|
|
The facet object of the search widget item. Contains facet settings for the search request. For example, how many individual facets to retrieve and in what order. |
Errors
get query
Returns the query property of the SearchWidgetItem instance.
set query
Sets the query property of the SearchWidgetItem instance.
Parameters
|
Name |
Type |
Description |
|---|---|---|
|
|
The query object of the search widget item. Settings related to the site visitor's search query. |
Errors
get offset
Returns the offset property of the SearchWidgetItem instance.
set offset
Sets the offset property of the SearchWidgetItem instance.
Parameters
|
Name |
Type |
Description |
|---|---|---|
|
|
|
The number of items to skip in the results that are returned. |
Errors
get sort
Returns the sort property of the SearchWidgetItem instance.
set sort
Sets the sort property of the SearchWidgetItem instance.
Parameters
|
Name |
Type |
Description |
|---|---|---|
|
|
Sorting configuration for search results. |
Errors
get suggestion
Returns the suggestion property of the SearchWidgetItem instance.
set suggestion
Sets the suggestion property of the SearchWidgetItem instance.
Parameters
|
Name |
Type |
Description |
|---|---|---|
|
|
The suggestion parameter of the search widget item. Used to configure search suggestions. Minimum: |
Errors
get ranking
Returns the ranking property of the SearchWidgetItem instance.
set ranking
Sets the ranking property of the SearchWidgetItem instance.
Parameters
|
Name |
Type |
Description |
|---|---|---|
|
|
The ranking parameter of the search widget item. Used to configure search result ranking. Minimum: |
Errors
get personalization
Returns the personalization property of the SearchWidgetItem instance.
set personalization
Sets the personalization property of the SearchWidgetItem instance.
Parameters
|
Name |
Type |
Description |
|---|---|---|
|
|
Options for personalizing search results. |
Errors
Methods
resetFacet
Resets the facet property to undefined.
Signature
Return value
Returns void.
resetQuery
Resets the query property to undefined.
Signature
Return value
Returns void.
resetOffset
Resets the offset property to undefined.
Signature
Return value
Returns void.
resetSort
Resets the sort property to undefined.
Signature
Return value
Returns void.
resetSuggestion
Resets the suggestion property to undefined.
Signature
Return value
Returns void.
resetRanking
Resets the ranking property to undefined.
Signature
Return value
Returns void.
resetPersonalization
Resets the personalization property to undefined.
Signature
Return value
Returns void.
toDTO
Maps the SearchWidgetItem instance to its DTO (data transfer object) format.
Signature
Return value
Returns the SearchWidgetItem instance in a standardized DTO format.