Skip to content

Commit

Permalink
removed unused FST test
Browse files Browse the repository at this point in the history
renamed uppercase misspelled file name
readded REST action _langdetect
  • Loading branch information
jprante committed Mar 2, 2016
1 parent 6ff3a41 commit 71e17be
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 338 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand Down
334 changes: 0 additions & 334 deletions pom.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@

public class CreateFST {

@Test
public void createMorphy() throws IOException {
final HashSet<BytesRef> words = new HashSet<BytesRef>();
final HashSet<BytesRef> words = new HashSet<>();
String[] inputs = new String[]{
"morphy.txt.gz",
"morphy-unknown.txt.gz"
Expand All @@ -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) {
Expand Down

0 comments on commit 71e17be

Please sign in to comment.