Hi Everyone, we have an Elasticsearch index with 100 million documents (with replicas it's about 400 million). The index contains nested documents as well.
We have a use case where we have to boost the score of the documents using some fields present in the document. For this boosting we are using function score query.
Our response time when we disable the fetch operation is less than 30ms. We use this endpoint to disable the fetch
https://<elastic_endpoint>/elastic_index_name/_search?_source=false
However when we enable the fetch the same response time becomes greater than 2 seconds.
We tried to debug using the profile API, but based on the docs it doesn't look like the profile api returns the time spent during the fetch operation. Hence the output of the profile api shows time in milliseconds which is the same when we run the query with _source disabled.
We tried to use other forms of scoring like rankFeatures and script score query. But we haven't had any luck.
Can someone please share if they have some insights into this issue? Please let me know if I any more details are needed from my end.