Skip to content

Instantly share code, notes, and snippets.

View czende's full-sized avatar
🎯
Focusing

Jan Czernin czende

🎯
Focusing
View GitHub Profile
@czende
czende / gist:6919c48850a8784f78f69106234fdf58
Created May 17, 2017 13:28 — forked from clintongormley/gist:4095280
Using synonyms in Elasticsearch

We create an index with:

  • two filters: synonyms_expand and synonyms_contract
  • two analyzers: synonyms_expand and synonyms_contract
  • three text fields:
    • text_1 uses the synonyms_expand analyzer at index and search time
    • text_2 uses the synonyms_expand analyzer at index time, but the standard analyzer at search time
    • text_3 uses the synonyms_contract analyzer at index and search time

.