Guide
Smart Search
Configurations
14 min
if you haven't gone through the prerequisites and the v2 structure, please have a look at overview docid\ czeodl0skcuv 18ipuplr there are numerous settings, preferences, and configurations available with apiv2 to fine tune your search and category merchandising queries this section explores them in more detail sorting the default sorting of results is relevance, which uses klevu a i to determine the order there are various other options available which you can provide to your customers as required try it here! pagination you may wish to split larger result sets over multiple pages you can do this using pagination simply specify a page size for how many results each page should include, and an offset of which record to start each result set from understanding response format params description noofresults the number of results requested to be returned for this query totalresultsfound the total number of results found for this query offset the index of the first result returned in this response typeofsearch the query type that was executed by klevu to retrieve the results try it here! fields by default, klevu will return most of the data available in a record if you only need certain elements and want to keep the response size small for performance reasons, you can specify only the fields you are interested in try it here! grouping the groupby parameter takes the name of a field indexed in the klevu search backend and ensures that there is only one record for each unique value of this field in the search results by default, the groupby operation is performed on the itemgroupid field when querying for klevu category or klevu cms records, it is recommended to use name as the groupby parameter value try it here! type of search the typeofsearch parameter defines the behaviour when identifying matches for a searched term for example, whether all or just one of the entered words must be matched, whether to allow spelling mistakes, etc try it here! preferences there are a number of preferences available for fine tuning your queries for example, you can control whether or not to allow fuzzy search for spelling mistakes on a query by query basis the available searchprefs are detailed below try it here!