And another question: how can I extract info about...
# community-help
d
And another question: how can I extract info about applied typos / dropped tokens in the results? We want to collect this information in query analytics + maybe show user some notice about possible irrelevant results
j
The search results don’t give additional information about typos / dropped tokens at the moment, but one way you could deduce this information is using the
matched_tokens
key in the response and compare it to the query that the user typed
matched_tokens is also an array, so if you count the number of items in the array and compare it to the number of words in the query, you’ll be able to tell if drop tokens kicked in
d
What about prefix search? I thought
matched_tokens
may contain more elements than query tokens
j
You’re right, the last word in the query will do a prefix search
So you’d have to consider partial substring matches just for the last word
👍 1
🫣 1
In any case, I think it would be good to expose this information in a more structured way in the response.
Could you create another GitHub issue for this, describing the ideal type of information (the JSON structure) that would help to power your use-case?
👍 1
d
Of course 🤓
🙏 1