Reputation: 63
How can I get the list of terms that elasticsearch matched in each result? I know the highlight contains this but I want to get a list of the terms that were found without manually performing postprocessing on the highlight for each result.
Upvotes: 6
Views: 1488
Reputation: 1336
You could use named queries with unique query for each term.
Search result will contain matched queries for each document in result.
Upvotes: 3