-
Notifications
You must be signed in to change notification settings - Fork 4
/
seunjeon-patch-7-1-1.diff
87 lines (77 loc) · 4.42 KB
/
seunjeon-patch-7-1-1.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
diff --git a/build.sbt b/build.sbt
index d3f2d32..3ab7b61 100644
--- a/build.sbt
+++ b/build.sbt
@@ -6,7 +6,6 @@ lazy val commonSettings = Seq(
scalaVersion := "2.12.0", // default
publishMavenStyle := true,
publishArtifact in Test := false,
- useGpg := true,
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (version.value.trim.endsWith("SNAPSHOT"))
@@ -66,7 +65,7 @@ lazy val seunjeon = (project in file(".")).
)
val elasticsearchPluginName = "elasticsearch-analysis-seunjeon"
-val esVersion = "6.1.1"
+val esVersion = $es_version_for_rebuild
val esJavaVersion = "1.8"
lazy val elasticsearch = (project in file("elasticsearch")).dependsOn(seunjeon).
@@ -112,8 +111,8 @@ lazy val elasticsearch = (project in file("elasticsearch")).dependsOn(seunjeon).
val zipFile = file(jarFile.getPath.substring(0, jarFile.getPath.length - jarFile.ext.length - 1) + ".zip")
IO.zip(
List(
- (propertiesFile, s"elasticsearch/${propertiesFile.getName}"),
- (jarFile, s"elasticsearch/${jarFile.getName}")),
+ (propertiesFile, s"${propertiesFile.getName}"),
+ (jarFile, s"${jarFile.getName}")),
zipFile)
zipFile
},
diff --git a/elasticsearch/src/main/java/org/bitbucket/eunjeon/seunjeon/elasticsearch/SeunjeonTokenizer.java b/elasticsearch/src/main/java/org/bitbucket/eunjeon/seunjeon/elasticsearch/SeunjeonTokenizer.java
index ac9a3d7..aa670fb 100644
--- a/elasticsearch/src/main/java/org/bitbucket/eunjeon/seunjeon/elasticsearch/SeunjeonTokenizer.java
+++ b/elasticsearch/src/main/java/org/bitbucket/eunjeon/seunjeon/elasticsearch/SeunjeonTokenizer.java
@@ -5,7 +5,7 @@ import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.tokenattributes.*;
import org.apache.lucene.analysis.util.RollingCharBuffer;
import org.apache.lucene.util.AttributeFactory;
-import org.elasticsearch.common.logging.ESLoggerFactory;
+import org.apache.logging.log4j.LogManager;
import java.io.IOException;
import java.io.StringWriter;
@@ -29,7 +29,7 @@ public class SeunjeonTokenizer extends Tokenizer {
public SeunjeonTokenizer(TokenizerOptions options) {
super(AttributeFactory.DEFAULT_ATTRIBUTE_FACTORY);
- logger = ESLoggerFactory.getLogger(options.getName());
+ logger = LogManager.getLogger(options.getName());
initAttribute();
tokenizerHelper = new TokenizerHelper(
diff --git a/elasticsearch/src/main/java/org/bitbucket/eunjeon/seunjeon/elasticsearch/index/analysis/SeunjeonTokenizerFactory.java b/elasticsearch/src/main/java/org/bitbucket/eunjeon/seunjeon/elasticsearch/index/analysis/SeunjeonTokenizerFactory.java
index 8709c91..3e33aef 100644
--- a/elasticsearch/src/main/java/org/bitbucket/eunjeon/seunjeon/elasticsearch/index/analysis/SeunjeonTokenizerFactory.java
+++ b/elasticsearch/src/main/java/org/bitbucket/eunjeon/seunjeon/elasticsearch/index/analysis/SeunjeonTokenizerFactory.java
@@ -20,7 +20,7 @@ public class SeunjeonTokenizerFactory extends AbstractTokenizerFactory {
Environment env,
String name,
Settings settings) {
- super(indexSettings, name, settings);
+ super(indexSettings, settings);
this.options = TokenizerOptions.create(name).
setUserDictPath(getFullPath(env, settings.get("user_dict_path", null))).
diff --git a/elasticsearch/src/main/scala/org/bitbucket/eunjeon/seunjeon/elasticsearch/TokenizerHelper.scala b/elasticsearch/src/main/scala/org/bitbucket/eunjeon/seunjeon/elasticsearch/TokenizerHelper.scala
index 7e60075..4feb2d7 100644
--- a/elasticsearch/src/main/scala/org/bitbucket/eunjeon/seunjeon/elasticsearch/TokenizerHelper.scala
+++ b/elasticsearch/src/main/scala/org/bitbucket/eunjeon/seunjeon/elasticsearch/TokenizerHelper.scala
@@ -6,13 +6,13 @@ import java.util.InvalidPropertiesFormatException
import org.apache.logging.log4j.Logger
import org.bitbucket.eunjeon.seunjeon._
import org.bitbucket.eunjeon.seunjeon.Pos.Pos
-import org.elasticsearch.common.logging.ESLoggerFactory
+import org.apache.logging.log4j.LogManager
import scala.collection.JavaConverters._
object TokenizerHelper {
- val logger: Logger = ESLoggerFactory.getLogger(TokenizerHelper.getClass.getName)
+ val logger: Logger = LogManager.getLogger(TokenizerHelper.getClass.getName)
val compress: Boolean = System.getProperty("seunjeon.compress") match {
case "true" => true