@sitecore-cloudsdk/search/browser
|
Import path |
|
The browser module of the Cloud SDK search package provides the following functions, classes, interfaces, types, and variables to create search experiencessearch experiences and capture search eventsevents from the browser side.
Functions
Work with widgetswidgets and events using the following functions:
|
Name |
Description |
|---|---|
|
Used as a method by the | |
|
Widgets | |
|
Retrieves data for one or more widgets. | |
|
Events | |
|
Sends a widget view event. | |
|
Sends a widget item click event. | |
|
Sends a facet click event. | |
|
Sends a navigation click event. | |
|
Sends a suggestion click event. | |
|
Sends an entity view event. | |
Classes
|
Name |
Description |
|---|---|
|
Widgets | |
|
Data about the widget or widgets to retrieve. | |
|
A widget item for a search widget. | |
|
A widget item for a recommendation widget. | |
|
A widget item for a questions-answers widget. | |
|
Context | |
|
Details about the site visitor's search request, such as locale, location, device, and web browser information. Sitecore Search uses this data for personalizing search results. | |
|
Filters | |
|
A filter with relation conditions. Used for filtering search results by comparing the entity's attribute to a certain value. | |
|
A filter that returns search results if all or any of a set of values are included in a certain attribute. | |
|
A filter with logical conditions. Used for returning search results that match a set of filters or that do not match a certain filter. | |
|
A filter that returns search results depending on geographical data, such as the radius of a circular geographical area. | |
|
A filter that returns search results depending on geographical data, such as an area defined by polygon area coordinates. | |
|
Filters for facets | |
|
A filter with relation conditions. Used for filtering facet values by comparing the facet value to a certain value you provide. | |
|
A filter that returns facet values if all or any of a set of values are included in a certain facet value. | |
|
A filter with logical conditions. Used for returning search results that match a set of filter values or that do not match a certain filter value. | |
|
A filter that returns search results that do not match a certain filter value. | |
Interfaces
Structure objects using the following interfaces:
|
Name |
Description |
|---|---|
|
Events | |
|
Data about the index documentsindex documents the site visitor interacts with in the search results. | |
|
Data common to search events. | |
|
Data for entity page view events. | |
|
Data for widget view events. | |
|
Data for widget item click events. | |
|
Data for facet click events. | |
|
Data for navigation click events. | |
|
Data for suggestion click events. | |
|
Widgets | |
|
Options for the search widget item object. | |
|
The query object of the search widget item. Settings related to the site visitor's search query. | |
|
Sorting configuration for search results. | |
|
The sort parameter options of the search widget item. Used to configure the sorting of search results. | |
|
Options for rules. Rules are modifications to widget behavior that can be used to overwrite the natural set of search results, for example, to boost, bury, pin, and blacklist items. | |
|
Boost rules for a search request. Used to improve the visibility of certain content by making an item or group of items appear higher in the search results. | |
|
Include rules for a search request. Used to force a list of items or categories to appear in specific slots, even if they are not in the natural results set for a request. | |
|
Pin rules for a search request. Used to force a single item or category to appear in a specific slot even if it is not in the natural results set for a request. | |
|
The suggestion parameter of the search widget item. Used to configure search suggestions. | |
|
The ranking parameter of the search widget item. Used to configure search result ranking. | |
|
The results object of a widget item. | |
|
The recommendation object of a widget item. | |
|
Filters | |
|
Logical conditions for filtering search results. | |
|
Geographical data used for filtering search results. | |
|
Data common to search suggestions and facets. Part of the | |
|
Filters for facets | |
|
Data for facets. Part of the | |
|
Data for range facets. Part of the | |
|
Facets | |
|
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. | |
|
Sorting configuration for the facet values in the individual facets. For example, the ability to sort in descending alphabetical order. | |
|
The type object of a facet object. Settings for an individual facet. | |
|
Context | |
|
Details about the site visitor's search request, such as locale, location, device, and web browser information. Sitecore Search uses this data for personalizing search results. | |
|
The country and language the webpage is being viewed in. | |
|
The URI the site visitor came to the current webpage from. | |
|
Data about the site visitor. | |
|
Data about the online store where the site visitor made the search request. Typically used in Buy Online Pickup In Store retail strategies. | |
|
The UTM parameters in the URL of the webpage. | |
|
Geographical data about the search request. | |
|
In context: the geographical coordinates of the location where the site visitor made the search request. In filters: the location that the site visitor wants to see search results for. | |
|
Data about the site visitor's web browser. | |
|
Options for retrieving AI-powered questions and answers. | |
|
Options to retrieve a single answer to the site visitor's query. Used in the questions-answers object of a widget item. | |
|
Options to retrieve AI-generated question-and-answer pairs relevant to the site visitor's query. Used in the questions-answers object of a widget item. | |
Types
Populate data requests with objects implementing the following types:
|
Name |
Description |
|---|---|
|
Widgets | |
|
Options for personalizing search results. | |
|
Options to determine which recommendations are given by a recommendation widget. | |
|
The type of site visitor query to retrieve an exact answer for. | |
|
The relative path of the webpage to retrieve widget data for. | |
|
The content options property of the results widget item. Used to select the attributes to request for each item. For example, to request only the | |
|
A recipe for recommendations. A recipe is used to determine which recommendations are given by a recommendation widget. | |
|
Filters | |
|
Various filter criteria that can be used to filter search results or recommendations. | |
|
One of the available operators. Operators are used for filtering search results. | |
|
Comparison operators, such as greater than and less than or equal to. Used for filtering search results and facet values. | |
|
Operators that check if all or any of a set of values are included in a certain attribute. Used for filtering search results. | |
|
The logical operators | |
|
An operator for using distance from a specific location to filter search results. | |
|
An operator for using a polygonal area to filter search results. | |
|
An array of geographical coordinates. Used for filtering search results. | |
|
The radius of the circular geographical area where you want Sitecore Search to find suitable search results. | |
|
The accepted units of distance. Used in | |
|
Filters for facets | |
|
One of the available facet filters. Facet filters are the filter settings to apply to a facet type. | |
|
Filter for facet values. | |
|
Options for filtering. Used for managing how other filtering affects this facet, and how filtering in this facet affects other facets. | |
|
Facets | |
|
Whether to sort facet values alphabetically ( | |
|
Whether to sort values in an ascending ( | |
Variables
|
Name |
Description |
|---|---|
|
The Cloud SDK and package name. |