Suggestions response doesnt contain index information or information about document where the suggestion was found

Hi, I am trying to trace a suggestion to its source document returned by my search suggestion query in Elasticsearch 7.9

It seems the suggest Options only returns the suggested text , frequency and score. I see that the c# nest library i am using does support few other fields like index and context but they are always returned as null. Wanted to know if there is a way to enable these fields so that we can better trace from where a particular suggestion has been suggested.

Reason i want to do this is because my suggestion query is suggesting me a word that i cannot find in the general search query throughout my index so i want to make sure if the suggested word actually exists or is this a false record returned by the suggestions api.

I am searching the word purpoes which is a wrongly typed word for 'Purpose'

and i am getting a suggestion for the word 'Purpose' and 'Purpos' out of which the second word is no where to be found in my whole index.

Can i get any help on this issue please ?

Please note that version is EOL and no longer supported, you should be looking to upgrade as a matter of urgency.

That said, have you tried the explain endpoint?

Thanks for the reply. Yup i can upgrade soon.

and yes i tried to add explain in the suggest query but it only gives explanation for the main query results and nothing for the suggestions block.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.