Skip to end of metadata
Go to start of metadata

As you may know, the query pipeline conditions can be applied on a list of predefined variables like the Browser or the Language. It is also possible to specify your own context attribute if needed.

To leverage custom context attributes in the Query Pipeline

  1. In your search page, use a snippet of code like the following to push the context information:

    Adding a custom context parameter
  2. In the Coveo Cloud Administration Console, build your condition in the query pipeline conditions:
    1. In the panel on the left, click Conditions.
    2. On the right sidebar, switch to the CODE view.
    3. Write your condition using in this format:
      when $context[myContextualVariable] is "MY VALUE"

You can now use this condition on any pipeline rule that you want to apply it to.

See also:

Query Pipeline Language (QPL)



  • No labels