Details
-
Improvement
-
Resolution: Won't Fix
-
Critical
-
Cheshire-Cat
-
1
Description
Search service users might want to monitor the currently running active queries in a node for FTS. This would help them gain insights into the ongoing slow-queries or other debugging purposes.
FTS has a new REST endpoint for serving this capability.
The users could use the `/api/query` endpoint for obtaining details about all the active queries in any FTS node in a cluster.
Example:
curl -XGET -H "Content-Type: application/json" -u<UserName:Password> http://localhost:9200/api/query
This endpoint takes an optional `longerThan` argument which can be used to filter the queries running beyond the given span of time.
curl -XGET -H "Content-Type: application/json" -uAdministrator:asdasd 'http://localhost:9200/api/query?longerThan=10s'
The users could use the `/api/query/index/{indexName}` endpoint for obtaining details about all the active queries against any given FTS index in the system. And the `longerThan` filter parameter is applicable here as well.
curl -XGET -H "Content-Type: application/json" -uAdministrator:asdasd 'http://localhost:9200/api/query/index/<indexName>?longerThan=1ms