Troubleshoot Query Pipeline Rules

In this article

If one or more query pipeline rules aren’t behaving as you expect, you can find useful troubleshooting information in the execution report. This report contains query evaluation details such as which query pipeline features were applied and in what order, what the final query sent to the index was, and so on.

Access the Execution Report

Note

Google Chrome is the browser used for this tutorial. Although you can access the execution report using any browser you like, the process may differ.

  1. In the page where your search component is integrated, access the Network tab of the Google Chrome developer tools by either:

    • Pressing the F12 key.

    • Right-clicking anywhere in the page, selecting the Inspect option, and selecting the Network tab.

      DevToolsExample
  2. Type a query in the search box, and then press the Enter key or click the search button.

  3. Enable the debug mode by either:

    • Adding &debug=true at the end of the current URL address.

      debugTrueExample
    • Pressing and holding the Alt key (Option key for Mac) and double-clicking on any search result box. At the top right of the panel you just opened, make sure the Enable query debug option is selected. You can then close this panel by pressing the Escape key.

      QueryDebugExample
  4. Return to the developer tools panel you opened in step 1.

  5. In the Name column of the network request table, select the HTTP request which corresponds to the query you just submitted. This should be the latest POST or GET request to https://platform.cloud.coveo.com/rest/search or https://platform.cloud.coveo.com/rest/search/v2.

    NameSectionExample
  6. Select the Preview tab. You should now see the query response body.

  7. Expand the executionReport property.

  8. Expand the children property. You should now be able to visualize the whole path your query took before the results were returned to search interface.

    children-subsectionExample
Note

In the execution report, some query pipeline features have different names than in the Coveo Administration Console (see Query Pipeline Features).

Example
  1. In a new query pipeline named My Pipeline, you create the following Filters rule:

    Add @source=="movie" to the advanced query expression (aq).

  2. In the same pipeline, you create the following Thesaurus rule:

    Replace The Lord of the Rings in the current query by The Fellowship of the Ring if the advanced query is @source=="movie".

  3. To test your changes in the query pipeline, you send this query to the search interface: The Lord of the Rings. You realise that rule 2. was never applied.

  4. To understand what went wrong with the query going through My Pipeline, you access the execution report, which gives you the following information:

    TroubleshootingQuery3Example

As the items in the execution report children subsection appear in the actual order they were executed on the pipeline, you see that the Thesaurus rule executes before the Filters rule. Because of this, the advanced query (aq) remains undefined until later in the execution when the Filters rule is executed, therefore failing to satisfy your Thesaurus rule (see Order of Execution of Query Pipeline Features).