Apache Solr open-source search software
LUCENE-3898: reset() was missing some state
Michael McCandless1a191f4edc97
diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymFilter.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymFilter.javaindex f55eb533ce7..b0dd7073336 100644--- a/modules/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymFilter.java+++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymFilter.java@@ -609,11 +609,14 @@ public final class SynonymFilter extends TokenFilter {super.reset();captureCount = 0;finished = false;+ inputSkipCount = 0;+ nextRead = nextWrite = 0;// In normal usage these resets would not be needed,// since they reset-as-they-are-consumed, but the app- // may not consume all input tokens in which case we- // have leftover state here:+ // may not consume all input tokens (or we might hit an+ // exception), in which case we have leftover state+ // here:for (PendingInput input : futureInputs) {input.reset();}