Build UI
Modify Request

Examples

6min

Modify Request

Below are some common uses of modifying the query request. You can find guides for more elaborate customizations within the How-To section of the Template JS documentation.

Please review : The Modify Request Overview for complete details on the syntax used for modifying the outgoing query.



Facet/Filter Options Count

Increase the default maximum number of filter options (10) to "20" for every query.

JS


API Parameter

Description

options.limit

Specify the maximum number of options to be included per filter.

See : Klevu API documentation on Retrieving Filters for more details and options



Run-time Boosting

Influence the relevancy algorithm by assigning weight to different aspects at the time of query.

JS


API Parameter

Description

boost

Query-level aspects to influence the relevancy rankings

See : Klevu API Personalisation for more details and more options



Constrain Result Set (Advanced Filtering)

You can add a groupCondition to restrict the result set to specific attributes and values. This constraint is typically applied "behind the scenes" to create specialized result set experiences.

Some examples include:

  • Brand specific listings
  • Curated landing pages
  • Automotive fitment
JS


API Parameter

Description

groupOperator

Defines the condition of filtering (ALL_OF, ANY_OF, NONE_OF)

conditions

The array of attributes (key) to apply to the condition

See : Klevu API Advance Filtering for more details and more options

Updated 02 Apr 2024
Doc contributor
Did this page help you?