Enable Debug Information in the REST Queries

The REST API used by the Coveo JavaScript Search Framework supports including debug information in the JSON results. This information includes details about the query evaluation, such as which thesaurus rules were applied, what was the final query sent to the index, what user identities were used, and so on. This debug information is generated when the REST request has a debug=1 query string parameter specified. The output can be seen through the browser developer tools by looking either at the network requests directly, or through the logs in the console.

For convenience, the Coveo JavaScript Search Framework will automatically include this argument when making requests if it’s present in the query string used to load the search page.

The following URL enables debug information for a search page: http://server/page?debug=1

It’s also possible to enable debug information for a specific search endpoint by directly setting its debug string argument to 1.

For example:

Enabling debug information for the default search endpoint

Coveo.SearchEndpoint.endpoints.default.caller.options.queryStringArguments.debug = 1;
Recommended Articles