Retrieve list of keyword variants using phonetic plugin

Currently, the phonetic plugin performs full text search on the field and returns the whole content when a phonetically similar word is present in the content.

How do i return just that phonetically similar word instead of the whole content?

E.g. from ES documentation

Querying for:
GET /my_index/my_type/_search
{
"query": {
"match": {
"name.phonetic": {
"query": "Smeeth"
}
}
}
}

Would give me: John Smith, Johnnie Smythe
But what I want is: Smith, Smythe

You could try use a highlighter and parse the result for the text between the <em>...</em> markup.

This would only work for a single-term search otherwise you'd have a hard time reverse engineering which search term was being highlighted with which tag.

Thank you Mark! Currently that is the way i would be going towards

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