WARNING: Version 5.x has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Profile Usage
editProfile Usage
editThis functionality is experimental and may be changed or removed completely in a future release.
The Profile API provides detailed timing information about the execution of individual components in a query. It gives the user insight into how queries are executed at a low level so that the user can understand why certain queries are slow, and take steps to improve their slow queries.
The output from the Profile API is very verbose, especially for complicated queries executed across many shards. Pretty-printing the response is recommended to help understand the output
See the Elasticsearch documentation on Profile API for more detail.
Fluent DSL example
edits => s .Profile() .Query(q => q .Term(p => p.Name, "elasticsearch") )
Object Initializer syntax example
editnew SearchRequest<Project> { Profile = true, Query = new TermQuery { Field = "name", Value = "elasticsearch" } }
Example json output.
{ "profile": true, "query": { "term": { "name": { "value": "elasticsearch" } } } }