Skip to content

Commit 4a6098f

Browse files
committed
call public method instead of private field
see 760f2dbdcb29b993aab8f981d84ccbf2e20e9fa5
1 parent a4d8c3f commit 4a6098f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.bellszhu.elasticsearch</groupId>
66
<artifactId>elasticsearch-analysis-dynamic-synonym</artifactId>
7-
<version>7.3.1</version>
7+
<version>7.6.1</version>
88
<packaging>jar</packaging>
99
<name>elasticsearch-dynamic-synonym</name>
1010
<description>Analysis-plugin for synonym</description>

src/main/java/com/bellszhu/elasticsearch/plugin/synonym/analysis/DynamicSynonymFilter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ private void parse() throws IOException {
197197
BytesRef pendingOutput = fst.outputs.getNoOutput();
198198
fst.getFirstArc(scratchArc);
199199

200-
assert scratchArc.output == fst.outputs.getNoOutput();
200+
assert scratchArc.output() == fst.outputs.getNoOutput();
201201

202202
int tokenCount = 0;
203203

@@ -263,15 +263,15 @@ private void parse() throws IOException {
263263

264264
// Accum the output
265265
pendingOutput = fst.outputs.add(pendingOutput,
266-
scratchArc.output);
266+
scratchArc.output());
267267
bufUpto += Character.charCount(codePoint);
268268
}
269269

270270
// OK, entire token matched; now see if this is a final
271271
// state:
272272
if (scratchArc.isFinal()) {
273273
matchOutput = fst.outputs.add(pendingOutput,
274-
scratchArc.nextFinalOutput);
274+
scratchArc.nextFinalOutput());
275275
matchInputLength = tokenCount;
276276
matchEndOffset = inputEndOffset;
277277
}
@@ -288,7 +288,7 @@ private void parse() throws IOException {
288288
// More matching is possible -- accum the output (if
289289
// any) of the WORD_SEP arc:
290290
pendingOutput = fst.outputs.add(pendingOutput,
291-
scratchArc.output);
291+
scratchArc.output());
292292
if (nextRead == nextWrite) {
293293
capture();
294294
}

src/main/java/com/bellszhu/elasticsearch/plugin/synonym/analysis/DynamicSynonymTokenFilterFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public AnalysisMode getAnalysisMode() {
144144

145145
Analyzer buildSynonymAnalyzer(TokenizerFactory tokenizer, List<CharFilterFactory> charFilters,
146146
List<TokenFilterFactory> tokenFilters, Function<String, TokenFilterFactory> allFilters) {
147-
return new CustomAnalyzer("dynamic_synonym", tokenizer, charFilters.toArray(new CharFilterFactory[0]),
147+
return new CustomAnalyzer(tokenizer, charFilters.toArray(new CharFilterFactory[0]),
148148
tokenFilters.stream()
149149
.map(TokenFilterFactory::getSynonymFilter)
150150
.toArray(TokenFilterFactory[]::new));

0 commit comments

Comments
 (0)