thank you again for the bug report with test case!

Is there a recommended workaround that avoids combining the new and old
> APIs?


if you aren't able to patch lucene, maybe apply this workaround patch to
your solr.
this will dodge the problem for your case, by forcing it to only use
next(Token) api.

Index: src/java/org/apache/solr/analysis/SynonymFilter.java
===================================================================
--- src/java/org/apache/solr/analysis/SynonymFilter.java    (revision
816467)
+++ src/java/org/apache/solr/analysis/SynonymFilter.java    (working copy)
@@ -179,7 +179,8 @@
     SynonymMap result = null;

     if (map.submap != null) {
-      Token tok = nextTok();
+      Token tok = new Token();
+      tok = nextTok(tok);
       if (tok != null) {
         // check for positionIncrement!=1?  if>1, should not match, if==0,
check multiple at this level?
         SynonymMap subMap = map.submap.get(tok.termBuffer(), 0,
tok.termLength());


-- 
Robert Muir
rcm...@gmail.com

Reply via email to