Hi,
 
> To me, it seemed natural to overload #setReader so that our tokenizer was in a
> consistent state once it was called. It occurs to me to wonder about
> order: if #reset is called before #setReader, I'm up creek unless I copy my 
> reset
> implementation into a local override of #setReader.

The order is defined in TokenStream and Tokenizer JavaDocs. First call 
setReader on the Tokenizer and after that the *consumer* has to call reset() on 
the chain of filters. When a user uses your Tokenizer, he will set a new Reader 
and then pass it to the indexer. Indexer (the consumer) will then call reset() 
before incrementToken() is called for the first time. In Lucene's 
BaseTokenStreamTestcase, this is asserted to be correct.

Uwe


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to