Words with similar sounds

It would boost user experience if we could map words with similar sounds, such as forgot or forghot. We can use the phonetic analyzer for this.

The phonetic analyzer is a community-driven project and is capable of understanding words with similar sounds.

First, we need to install the phonetic analyzer. You can find the code base at https://github.com/elastic/elasticsearch-analysis-phonetic.

We can install the plugin using the following command:

bin/plugin install elasticsearch/elasticsearch-analysis-phonetic/2.4.2

Then, we need to create an analyzer out of it:

curl -X PUT "http://localhost:9200/my-index" -d '{ "index": { "number_of_shards": 1, "number_of_replicas": 1 }, "analysis": { "filter": { "my_metaphone": { "type": "phonetic", ...

Get Elasticsearch Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.