Skip to content

Commit

Permalink
feat: elastic 8.4.3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
gilmatok committed Jun 1, 2023
1 parent 57600a9 commit dc40a24
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.bellszhu.elasticsearch</groupId>
<artifactId>elasticsearch-analysis-dynamic-synonym</artifactId>
<version>7.4.2</version>
<version>8.4.3</version>
<packaging>jar</packaging>
<name>elasticsearch-dynamic-synonym</name>
<description>Analysis-plugin for synonym</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ private void parse() throws IOException {
BytesRef pendingOutput = fst.outputs.getNoOutput();
fst.getFirstArc(scratchArc);

assert scratchArc.output == fst.outputs.getNoOutput();
assert scratchArc.output() == fst.outputs.getNoOutput();

int tokenCount = 0;

Expand Down Expand Up @@ -271,15 +271,15 @@ private void parse() throws IOException {

// Accum the output
pendingOutput = fst.outputs.add(pendingOutput,
scratchArc.output);
scratchArc.output());
bufUpto += Character.charCount(codePoint);
}

// OK, entire token matched; now see if this is a final
// state:
if (scratchArc.isFinal()) {
matchOutput = fst.outputs.add(pendingOutput,
scratchArc.nextFinalOutput);
scratchArc.nextFinalOutput());
matchInputLength = tokenCount;
matchEndOffset = inputEndOffset;
}
Expand All @@ -296,7 +296,7 @@ private void parse() throws IOException {
// More matching is possible -- accum the output (if
// any) of the WORD_SEP arc:
pendingOutput = fst.outputs.add(pendingOutput,
scratchArc.output);
scratchArc.output());
if (nextRead == nextWrite) {
capture();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ private boolean parse() throws IOException {
BytesRef pendingOutput = fst.outputs.getNoOutput();
fst.getFirstArc(scratchArc);

assert scratchArc.output == fst.outputs.getNoOutput();
assert scratchArc.output() == fst.outputs.getNoOutput();

// How many tokens in the current match
int matchLength = 0;
Expand Down Expand Up @@ -354,7 +354,7 @@ private boolean parse() throws IOException {
}

// Accum the output
pendingOutput = fst.outputs.add(pendingOutput, scratchArc.output);
pendingOutput = fst.outputs.add(pendingOutput, scratchArc.output());
bufUpto += Character.charCount(codePoint);
}

Expand All @@ -363,7 +363,7 @@ private boolean parse() throws IOException {
// OK, entire token matched; now see if this is a final
// state in the FST (a match):
if (scratchArc.isFinal()) {
matchOutput = fst.outputs.add(pendingOutput, scratchArc.nextFinalOutput);
matchOutput = fst.outputs.add(pendingOutput, scratchArc.nextFinalOutput());
matchInputLength = matchLength;
matchEndOffset = inputEndOffset;
//System.out.println(" ** match");
Expand All @@ -379,7 +379,7 @@ private boolean parse() throws IOException {
} else {
// More matching is possible -- accum the output (if
// any) of the WORD_SEP arc:
pendingOutput = fst.outputs.add(pendingOutput, scratchArc.output);
pendingOutput = fst.outputs.add(pendingOutput, scratchArc.output());
doFinalCapture = true;
if (liveToken) {
capture();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public DynamicSynonymTokenFilterFactory(
String name,
Settings settings
) throws IOException {
super(indexSettings, name, settings);
super(name, settings);

this.location = settings.get("synonyms_path");
if (this.location == null) {
Expand Down

0 comments on commit dc40a24

Please sign in to comment.