From 0d486c95422a26c6cc79322e9da202053daf8539 Mon Sep 17 00:00:00 2001 From: Damien ALEXANDRE Date: Fri, 19 Jan 2018 21:32:52 +0100 Subject: [PATCH] Update to Elasticsearch 6.1.2! --- esplugin/README.md | 11 +++++++---- esplugin/build.gradle | 7 ++----- .../org/elasticsearch/index/analysis/EmojiIT.java | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/esplugin/README.md b/esplugin/README.md index 512f481..1e41587 100644 --- a/esplugin/README.md +++ b/esplugin/README.md @@ -11,8 +11,8 @@ The plugin version must match your Elasticsearch version. ``` bin/elasticsearch-plugin install URL -# For 5.6.6: -bin/elasticsearch-plugin install https://github.com/jolicode/emoji-search/releases/download/5.6.6/analysis-emoji-5.6.6.zip +# For 6.1.2: +bin/elasticsearch-plugin install https://github.com/jolicode/emoji-search/releases/download/6.1.2/analysis-emoji-6.1.2.zip ``` ## Versions @@ -21,6 +21,7 @@ ICU is always up to date to the latest data in this plugin, so upgrading may req analysis-emoji version and ES version | Install URL -----------|----------- +6.1.2 | https://github.com/jolicode/emoji-search/releases/download/6.1.2/analysis-emoji-6.1.2.zip 5.6.6 | https://github.com/jolicode/emoji-search/releases/download/5.6.6/analysis-emoji-5.6.6.zip 5.5.0 | https://github.com/jolicode/emoji-search/releases/download/5.5.0/analysis-emoji-5.5.0.zip 5.4.3 | https://github.com/jolicode/emoji-search/releases/download/5.4.3/analysis-emoji-5.4.3.zip @@ -86,14 +87,16 @@ PUT /en-emoji Try it: ```json -GET /en-emoji/_analyze?analyzer=english_with_emoji +GET /en-emoji/_analyze { + "analyzer": "english_with_emoji", "text": "I live in 🇫🇷 and I'm 👩‍🚀" } # Result: i live in 🇫🇷 france and i'm 👩‍🚀 astronaut rocket woman -GET /en-emoji/_analyze?analyzer=english_with_emoji +GET /en-emoji/_analyze { + "analyzer": "english_with_emoji", "text": "Hi mom :)" } # Result: hi mom 😃 face mouth open smile diff --git a/esplugin/build.gradle b/esplugin/build.gradle index 6b8567f..0a25d68 100644 --- a/esplugin/build.gradle +++ b/esplugin/build.gradle @@ -8,20 +8,17 @@ buildscript { jcenter() } dependencies { - classpath "org.elasticsearch.gradle:build-tools:5.6.6" + classpath "org.elasticsearch.gradle:build-tools:6.1.2" } } group = 'org.elasticsearch.plugin' -version = '5.6.6' +version = '6.1.2' apply plugin: 'java' apply plugin: 'elasticsearch.esplugin' apply plugin: 'idea' -// this is temporal and will be fixed in 6.0 -ext.projectSubstitutions = [:] - esplugin { name 'analysis-emoji' description 'Add support for emoji in Elasticsearch' diff --git a/esplugin/src/test/java/org/elasticsearch/index/analysis/EmojiIT.java b/esplugin/src/test/java/org/elasticsearch/index/analysis/EmojiIT.java index 9f1dd63..5945e07 100644 --- a/esplugin/src/test/java/org/elasticsearch/index/analysis/EmojiIT.java +++ b/esplugin/src/test/java/org/elasticsearch/index/analysis/EmojiIT.java @@ -25,7 +25,7 @@ public void testSimpleIcuTokenizer() throws IOException { .put(Environment.PATH_HOME_SETTING.getKey(), createTempDir()) .build(); - Environment env = new Environment(nodeSettings); + Environment env = new Environment(nodeSettings, null); // Build the Tokenizer TokenizerFactory tokenizerFactory = new EmojiTokenizerFactory(