Details of the profile api on Elasticsearch documentation.
We need the ability to add to a query using dsl-py the profile flag, probably something similar to extra properties and parameters . In addition, the response should hold the profile result.
I understand the use case, but it is also supported by the extra method and doesn't require it's own API:
s = Search().query(...)
s = s.extra(profile=True)
response = s.execute()
for shard in response.profile.shards:
print(shard.id)
for search in shard.searches:
for query in search.query:
print(query.query_type, query.lucene, query.time)
Currently I don't see the need to support this API in a more explicit way. Or is there anything in particular you are missing?
Thank you!
Cool,
Maybe this kind of example should be on the docs? I am not sure it is trivial.
Thanks
Most helpful comment
I understand the use case, but it is also supported by the
extramethod and doesn't require it's own API:Currently I don't see the need to support this API in a more explicit way. Or is there anything in particular you are missing?
Thank you!