diff --git a/README.md b/README.md index b01d65a..f4407f2 100644 --- a/README.md +++ b/README.md @@ -77,13 +77,13 @@ zh-cn zh-tw - ## Versions ![Travis](https://travis-ci.org/jprante/elasticsearch-langdetect.png) | Elasticsearch | Plugin | Release date | | -------------- | -------------- | ------------ | +| 1.4.0 | 1.4.0.1 | Nov 20, 2014 | | 1.4.0 | 1.4.0.0 | Nov 14, 2014 | | 1.3.1 | 1.3.0.0 | Jul 30, 2014 | | 1.2.1 | 1.2.1.1 | Jun 18, 2014 | @@ -91,7 +91,7 @@ zh-tw ## Installation - ./bin/plugin -install langdetect -url http://xbib.org/repository/org/xbib/elasticsearch/plugin/elasticsearch-langdetect/1.4.0.0/elasticsearch-langdetect-1.4.0.0-plugin.zip + ./bin/plugin -install langdetect -url http://xbib.org/repository/org/xbib/elasticsearch/plugin/elasticsearch-langdetect/1.4.0.1/elasticsearch-langdetect-1.4.0.1-plugin.zip Do not forget to restart the node after installing. @@ -99,6 +99,7 @@ Do not forget to restart the node after installing. | File | SHA1 | | --------------------------------------------- | -----------------------------------------| +| elasticsearch-langdetect-1.4.0.1-plugin.zip | a7ab2401ae68789bf1e5841427ce40440c903da4 | | elasticsearch-langdetect-1.4.0.0-plugin.zip | f95361fa1a81b2681e2e9002b03ca6aad57f3012 | | elasticsearch-langdetect-1.3.0.0-plugin.zip | e2dd56c72f19cec861141becd8beb18d7bb26ee6 | | elasticsearch-langdetect-1.2.1.1-plugin.zip | cc3a0d5ccecf1210b96771dcb5c9935176e1cc35 | diff --git a/src/main/java/org/xbib/elasticsearch/index/mapper/langdetect/LangdetectMapper.java b/src/main/java/org/xbib/elasticsearch/index/mapper/langdetect/LangdetectMapper.java index a792f9d..ea65b9d 100644 --- a/src/main/java/org/xbib/elasticsearch/index/mapper/langdetect/LangdetectMapper.java +++ b/src/main/java/org/xbib/elasticsearch/index/mapper/langdetect/LangdetectMapper.java @@ -55,6 +55,11 @@ public Builder lang(StringFieldMapper.Builder lang) { return this; } + public Builder profile(String profile) { + settingsBuilder.put("profile", profile); + return this; + } + public Builder ntrials(int trials) { settingsBuilder.put("number_of_trials", trials); return this; @@ -203,6 +208,10 @@ public Mapper.Builder parse(String name, Map node, ParserContext builder.languages((List) fieldNode); break; } + case "profile": { + builder.profile((String) fieldNode); + break; + } } } return builder; diff --git a/src/main/java/org/xbib/elasticsearch/module/langdetect/LangdetectService.java b/src/main/java/org/xbib/elasticsearch/module/langdetect/LangdetectService.java index 49aee02..18ff5ac 100644 --- a/src/main/java/org/xbib/elasticsearch/module/langdetect/LangdetectService.java +++ b/src/main/java/org/xbib/elasticsearch/module/langdetect/LangdetectService.java @@ -26,7 +26,7 @@ public class LangdetectService extends AbstractLifecycleComponent