Modules
klevubasequery
2min
ƭ klevubasequery object generic type declaration name type description abtestid? string the unique identifier of the a/b test abtestvariantid? string the unique identifier of the a/b test variant boost? { filters? { key string ; values string \[] ; weight number }\[] ; keywords? { phrase string ; weight number }\[] ; records? { id string ; weight number }\[] } if you have already built up a profile of your customer and would like to use what you know about them to promote certain results, you can use the boost object within each record query there are three ways the records can be boosted filter conditions keywords or phrases ids of specific records for example let's say you have an online store with an area where customers can log in from your stores purchase history, you know that one customer is particularly interested in the brand 'kke' from your analytics data, you also know the same customer also looked at the product detail page of the product with id '31366487375934' many times finally, you have an area where customers can specify keywords of their interests, and this customer wrote 'comfortable' as a merchant with all of this information available, you can build up a profile about this customer the sample to the right shows how you would convey this information to klevu during a search to find out more about how boosting works with your existing merchandising rules, please read this article on how personalisation works https //help klevu com/support/solutions/articles/5000871357 how does it work boost filters? { key string ; values string \[] ; weight number }\[] specify filter values to apply a boosting score to they key is the unique identifier of the attribute, eg color each of the values represents the value of that filter to boost, eg red or blue boost keywords? { phrase string ; weight number }\[] specify keywords or phrases to apply a boosting score to, for example "comfortable" boost records? { id string ; weight number }\[] specify the klevu id of any records to apply a boosting score to filters? klevulistfilter docid 2o3vpdb6dnuslrpgaiacs & klevuapplyfilter docid 18mjl60ulcgi9eqeyq1in apply certain filters to query recommended to use modifier functions for these id string isfallbackquery? boolean specify a value of true for any queries that should not be executed until some particular criteria are met, in another query it is not possible for a fallback query to have its own fallback query use fallback() modifier to simplify usage settings? klevubasequerysettings docid\ dyd sdd9prrq0gcoerubz 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 typeofrequest klevutypeofrequest enums/klevutypeofrequest md this parameter defines the type of request it is defined in models/klevubasequery ts 11 https //github com/klevultd/frontend sdk/blob/492d3760/packages/klevu core/src/models/klevubasequery ts#l11