diff --git a/build.gradle b/build.gradle
index 1999f323..dea40500 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,6 +1,6 @@
def xbibGroup = 'org.xbib.elasticsearch.plugin'
-def xbibVersion = '2.2.0.1'
+def xbibVersion = '2.2.0.2'
group = xbibGroup
version = xbibVersion
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index f95ae33a..00000000
--- a/pom.xml
+++ /dev/null
@@ -1,334 +0,0 @@
-
-
-
- 4.0.0
-
- org.xbib.elasticsearch.plugin
- elasticsearch-plugin-bundle
- 2.2.0.0
-
- jar
-
- elasticsearch-plugin-bundle
- A bundle of plugins for Elasticsearch
-
- http://github.com/jprante/elasticsearch-plugin-bundle
-
- 2013
-
-
-
- Affero GPL3
- http://www.gnu.org/licenses/agpl.html
- repo
-
- The GNU Affero General Public License is a free, copyleft license for software and
- other kinds of works, specifically designed to ensure cooperation with the community
- in the case of network server software.
-
-
-
-
-
-
- jprante
- Jörg Prante
- https://github.com/jprante
-
-
-
-
- scm:git:git@github.com:jprante/elasticsearch-plugin-bundle.git
- scm:git:git@github.com:jprante/elasticsearch-plugin-bundle.git
- http://github.com/jprante/elasticsearch-plugin-bundle
-
-
-
- Github Issue Tracker
- https://github.com/jprante/elasticsearch-plugin-bundle/issues
-
-
-
-
- xbib.org
- scpexe://xbib.org/repository
-
-
-
-
-
- xbib
- http://xbib.org/repository
-
- true
-
-
- true
-
-
-
-
-
- github
- UTF-8
- 1.7
- 2.2.0
- 5.4.1
- 2.6.2
- ${java.version}
- ${elasticsearch.version}
- org.xbib.elasticsearch.plugin.bundle.BundlePlugin
- bundle
- ${project.description}
- true
- true
- false
- ${project.version}
-
-
-
-
- org.elasticsearch
- elasticsearch
- ${elasticsearch.version}
- jar
- compile
-
-
-
- org.apache.lucene
- lucene-analyzers-icu
- ${lucene.version}
- jar
- compile
-
-
-
- com.fasterxml.jackson.core
- jackson-databind
- ${jackson.version}
- jar
- compile
-
-
-
- net.java.dev.jna
- jna
- 4.1.0
- jar
- test
-
-
-
- junit
- junit
- 4.12
- jar
- test
-
-
-
- org.apache.logging.log4j
- log4j-slf4j-impl
- 2.5
- jar
- test
-
-
-
- org.apache.logging.log4j
- log4j-core
- 2.5
- jar
- test
-
-
-
-
-
-
-
- org.apache.maven.wagon
- wagon-ssh-external
- 2.10
-
-
-
-
- ${basedir}/src/main/resources
-
-
- ${basedir}/src/main/templates
- true
-
- plugin-descriptor.properties
-
-
-
- ${basedir}/src/main/templates
- false
-
- plugin-descriptor.properties
-
-
-
-
-
- maven-compiler-plugin
- 3.3
-
-
- ${java.version}
- UTF-8
- true
- true
- true
- -Xlint:all,-serial,-path,-rawtypes,-unchecked
-
-
-
- de.jflex
- jflex-maven-plugin
- 1.6.0
-
- false
-
-
-
-
- generate
-
-
-
-
-
- maven-clean-plugin
- 2.6.1
-
-
-
- data
-
-
-
-
-
- maven-surefire-plugin
- 2.19
-
-
- **/*Tests.java
-
-
-
- path.home
- ${project.basedir}/target
-
-
-
-
-
- maven-source-plugin
- 2.4
-
-
- attach-sources
-
- jar
-
-
-
-
-
- maven-assembly-plugin
- 2.5.5
-
- ${project.build.directory}/releases/
-
- ${basedir}/src/main/assemblies/plugin.xml
-
-
-
-
- package
-
- single
-
-
-
-
-
- maven-resources-plugin
- 2.6
-
- UTF-8
-
-
-
- maven-javadoc-plugin
- 2.10.3
-
- ${project.build.sourceEncoding}
- en
- true
- true
-
-
-
- package
-
- jar
-
-
-
-
-
- maven-site-plugin
- 3.3
-
- en
- UTF-8
- UTF-8
-
-
-
- com.github.github
- site-maven-plugin
- 0.12
-
- Building site for ${project.version}
-
-
-
-
- site
-
- site
-
-
-
-
-
-
-
-
-
- maven-javadoc-plugin
- 2.10.3
-
- ${project.build.sourceEncoding}
- en
- true
- true
-
-
-
- maven-surefire-report-plugin
- 2.19
-
-
-
-
-
diff --git a/src/main/java/org/xbib/elasticsearch/index/analysis/icu/ICUNumberFormatTokenFilter.java b/src/main/java/org/xbib/elasticsearch/index/analysis/icu/IcuNumberFormatTokenFilter.java
similarity index 100%
rename from src/main/java/org/xbib/elasticsearch/index/analysis/icu/ICUNumberFormatTokenFilter.java
rename to src/main/java/org/xbib/elasticsearch/index/analysis/icu/IcuNumberFormatTokenFilter.java
diff --git a/src/main/java/org/xbib/elasticsearch/plugin/bundle/BundlePlugin.java b/src/main/java/org/xbib/elasticsearch/plugin/bundle/BundlePlugin.java
index 421fd88c..6633bb66 100644
--- a/src/main/java/org/xbib/elasticsearch/plugin/bundle/BundlePlugin.java
+++ b/src/main/java/org/xbib/elasticsearch/plugin/bundle/BundlePlugin.java
@@ -29,6 +29,7 @@
import org.elasticsearch.index.analysis.AnalysisModule;
import org.elasticsearch.indices.IndicesModule;
import org.elasticsearch.plugins.Plugin;
+import org.elasticsearch.rest.RestModule;
import org.xbib.elasticsearch.index.analysis.baseform.BaseformAnalysisBinderProcessor;
import org.xbib.elasticsearch.index.analysis.concat.ConcatAnalysisBinderProcessor;
import org.xbib.elasticsearch.index.analysis.decompound.DecompoundAnalysisBinderProcessor;
@@ -53,6 +54,7 @@
import org.xbib.elasticsearch.index.mapper.standardnumber.StandardnumberMapperTypeParser;
import org.xbib.elasticsearch.module.langdetect.LangdetectService;
import org.xbib.elasticsearch.index.mapper.standardnumber.StandardnumberService;
+import org.xbib.elasticsearch.rest.action.langdetect.RestLangdetectAction;
import java.util.ArrayList;
import java.util.Collection;
@@ -181,4 +183,10 @@ public void onModule(IndicesModule indicesModule) {
}
}
+ public void onModule(RestModule module) {
+ if ("node".equals(settings.get("client.type")) && settings.getAsBoolean("plugins.langdetect.enabled", true)) {
+ module.addRestAction(RestLangdetectAction.class);
+ }
+ }
+
}
diff --git a/src/test/java/org/xbib/elasticsearch/index/analysis/decompound/fst/CreateFST.java b/src/test/java/org/xbib/elasticsearch/index/analysis/decompound/fst/CreateFST.java
index b9c9854f..8d29e207 100644
--- a/src/test/java/org/xbib/elasticsearch/index/analysis/decompound/fst/CreateFST.java
+++ b/src/test/java/org/xbib/elasticsearch/index/analysis/decompound/fst/CreateFST.java
@@ -21,9 +21,8 @@
public class CreateFST {
- @Test
public void createMorphy() throws IOException {
- final HashSet words = new HashSet();
+ final HashSet words = new HashSet<>();
String[] inputs = new String[]{
"morphy.txt.gz",
"morphy-unknown.txt.gz"
@@ -32,7 +31,7 @@ public void createMorphy() throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(
new GZIPInputStream(getClass().getResourceAsStream(input)), "UTF-8"));
Pattern pattern = Pattern.compile("\\s+");
- String line = null;
+ String line;
String last = null;
StringBuilder buffer = new StringBuilder();
while ((line = reader.readLine()) != null) {