Search Relevance Stats API
The Search Relevance Stats API provides information about operations. The Search Relevance plugin processes operations sent by the Compare Search Results Dashboards tool.
The Search Relevance Stats API captures statistics for a one-minute interval during which it receives a request. For example, if a request is received at 23:59:59.004, statistics are collected for the 23:58:00.000–23:58:59.999 time interval.
To change the default time interval for which statistics are collected, update the searchRelevanceDashboards.metrics.metricInterval
setting in the opensearch_dashboards.yml
file with the new time interval in milliseconds. The opensearch_dashboards.yml
file is located in the config
folder of your OpenSearch Dashboards installation. For example, the following sets the interval to one second:
Example request
The OpenSearch Dashboards endpoint address may contain a port number if it is specified in the OpenSearch configuration file. The specific URL format depends on the type of OpenSearch deployment and the network environment in which it is hosted.
You can query the endpoint in two ways:
By accessing the endpoint address (for example,
http://localhost:5601/api/relevancy/stats
) in a browser
Example response
The following is the response for the preceding request:
The following table lists all response fields.
Each of the comparison_search
, single_search
, and fetch_index
objects contains a list of HTTP response codes. The following table lists the fields for each response code.