The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

tmcsys (1) [Avatar] Offline
I'm afraid I'm having quite a bit of trouble migrating to the new TS API (from 2.3.1 no less).

I have several filters that modify add, modify, and delete tokens/(attributes) during indexing. I am testing my application with one single filter and trying to figure out the new API, indexing one field, using the SynonymFilter as a model.

Everything seems to work fine until I actually try to index the document with writer.addDocument(doc).

After adding a number of documents, this error crops up the first time that the filter attempts to insert a new Synonym.

Exception in thread "main" java.lang.IllegalArgumentException: State
contains an AttributeImpl that is not in this AttributeSource
at org.apache.lucene.util.AttributeSource.restoreState(

Any ideas?

otis (156) [Avatar] Offline
Re: New Token Stream API / SynonymFilter
Could you please ask on java-user Lucene list instead? The list information is on the Lucene site.