jolicode / emoji-search

:smile: Emoji synonyms to build your own emoji-capable search engine (elasticsearch, solr, OpenSearch)
https://jolicode.com/blog/elasticsearch-icu-now-understands-emoji
MIT License
218 stars 64 forks source link

Provide a proper "emoji_synonym_filter" #13

Closed damienalexandre closed 2 years ago

damienalexandre commented 7 years ago

The plugin should provide a new token filter, "emoji_synonym_filter", which would simplify the configuration from this:

PUT /en-emoji
{
  "settings": {
    "analysis": {
      "filter": {
        "english_emoji": {
          "type": "synonym",
          "synonyms_path": "analysis/cldr-emoji-annotation-synonyms-en.txt" 
        }
      },
      "analyzer": {
        "english_with_emoji": {
          "tokenizer": "emoji_tokenizer",
          "filter": [
            "lowercase",
            "english_emoji"
          ]
        }
      }
    }
  }
}

To this:

{
  "settings": {
    "analysis": {
      "filter": {
        "english_emoji": {
          "type": "emoji_synonym_filter",
          "language": "en" 
        }
      },
      "analyzer": {
        "english_with_emoji": {
          "tokenizer": "emoji_tokenizer",
          "filter": [
            "lowercase",
            "english_emoji"
          ]
        }
      }
    }
  }
}

One of the main feature is that the synonym files could be shipped directly with the bundle!

damienalexandre commented 2 years ago

The plugin is not maintained anymore.