You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reset Token position on reuse in scripted analysis (#47424)
Most of the information in AnalysisPredicateScript.Token is pulled directly
from its underlying AttributeSource, but we also keep track of the token position,
and this state is held directly on the Token. This information needs to be reset when
the containing ScriptFilteringTokenFilter or ScriptedConditionTokenFilter is re-used.
Fixes#47197
Copy file name to clipboardExpand all lines: modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PredicateTokenFilterScriptFactory.java
Copy file name to clipboardExpand all lines: modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/ScriptedConditionTokenFilterFactory.java
Copy file name to clipboardExpand all lines: modules/analysis-common/src/test/java/org/elasticsearch/analysis/common/PredicateTokenScriptFilterTests.java
+5-5
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ public void testSimpleFilter() throws IOException {
Copy file name to clipboardExpand all lines: modules/analysis-common/src/test/java/org/elasticsearch/analysis/common/ScriptedConditionTokenFilterTests.java
+4-4
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ public void testSimpleCondition() throws Exception {
0 commit comments