Search Query Errors Tracking

Overview

The Search Query Errors Tracking feature is designed to monitor and display errors that occur when search queries are already deployed in production. This feature is essential because search queries may have debug mode enabled, which does not return actual errors with the response. It allows tracking client errors, such as invalid request format, invalid search query configuration, or invalid public query fields. The dashboard and API displays up to 10 most recent errors for each query.

Query Errors API Reference

Get the latest errors of a search query

API Reference: Search Query Errors

To retrieve the latest errors of a search query, send an HTTP GET request to /indices/{indexId}/queries/{searchQueryId}/errors endpoint with the following parameters:

  • indexId - The identifier of the search index;
  • searchQueryId - The unique ID of the search query.

Example Request

GET /indices/<indexId>/queries/<searchQueryId>/errors

Example Response

[
  {
    "timestamp": 1673672832,
    "message": "Invalid request format",
    "publicQuery": {
      // Public Query JSON
    }
  },
  {
    "timestamp": 1673672320,
    "message": "Invalid search query configuration",
    "publicQuery": {
      // Public Query JSON
    }
  }
]

Response Description

  • timestamp - A Unix timestamp indicating when the error occurred;
  • message - Information about the error;
  • publicQuery - The Public Query JSON that allows the user to pinpoint the exact issue with their search query configuration.

Possible Errors

  • 400 Bad Request - When the indexId or searchQueryId is invalid or missing. Check the error response for more information about the issue.

Query Errors Dashboard Documentation

To access and view the search query errors in your dashboard, follow these steps:

  1. Navigate to the Search Queries page in your dashboard.
  2. Select a search query from the list.
  3. Click on the Error Button button to display the 10 most recent errors in a table, sorted by date from newest to oldest.

Error List Table

The table will have the following columns:

  • Date - The date when the error occurred;
  • Message - Information about the error;
  • Preview Query - An action button that displays a dialog with the formatted Public Query JSON, allowing the user to pinpoint the exact issue with their search query configuration.

When you click on the Preview Query button Preview Query , a dialog will open, showing the Public Query JSON related to the error. This can help you identify and resolve any issues in your search query configuration.

Error Preview Dialog