Query
The Query object used for requests to the Search API, contains many properties that define and narrow results. Query hooking through the JS SDK sets some properties. Others have to be set by the developer.
The JS SDK is built on top of the JS Data package. All request objects and methods available in the JS SDK are included in the JS Data package.
For documentation on the Search request object, refer to Search JS Data package.
setOffset
The method skip a certain number of results.
|
Argument |
Type |
Description |
|---|---|---|
|
|
integer |
Number of results to skip. Default 0. |
|
|
function |
Accepts any function in the following format: |
query: (query:SearchResultsWidgetQuery) => query.getRequest().setOffset(10)setSearchFilter
The method adds a search filter.
|
Argument |
Type |
Description |
|---|---|---|
|
|
FilterObject |
Required. This object describes the filter. |
query: (query:SearchResultsWidgetQuery) => query.getRequest().setOffset(10).setSearchFilter( new FilterEqual( 'category', 'bags') )