have a look at FreeTextSuggester.addShingles, which demonstrates an example of exactly what you are asking about - creates an AnalyzerWrapper that appends a TokenFilter to the TokenStream returned by the wrapped analyzer
On Wed, Aug 13, 2025 at 12:09 PM Viliam Ďurina <viliam.dur...@gmail.com> wrote: > > Hi all, > > I'm trying to figure out how to wrap an Analyzer instance and inject a > TokenFilter at the end of its filtering chain. I couldn't find a working > combination, including by using AnalyzerWrapper. The only way that worked > is copying the original analyzer code and modifying it. However, in my case > the Analyzer is user-supplied and I don't have control over it. > > Could you hint me on a way how to do this? > > Thanks, > Viliam --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org