lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edoardo Causarano <edoardo.causar...@gmail.com>
Subject A question over TokenFilters
Date Fri, 21 Apr 2017 15:20:02 GMT
Hi all.

I’m relatively new to Lucene, so I have a couple questions about writing custom filters.

The way I understand it, one would extend org.apache.lucene.analysis.TokenFilter and override
#incrementToken to examine the current token provided by a stream token producer.

I’d like to write some logic that considers the last n seen tokens therefore I need to access
this context as the filter chain is scanning the stream.

Can anyone point to an example of such a construct? 

Also, how would I access and update this context keeping multithreading in mind? Actually,
what is the treading model of a TokenStream, can anyone point out a good summary for it?

TIA


Best,
Edoardo
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message