You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by DVHV Sekhar <dv...@yahoo.com.INVALID> on 2014/08/25 09:10:48 UTC

org.apache.lucene.analysis.Analyzer

Please add public method Analyzer#createComponents(Analyzer analyzer, String fieldName,
      Reader reader) to org.apache.lucene.analysis.Analyzer

This required to decorate any existing analyzers. Or make existing createComponents method as public.

Thanks,
Sekhar 

RE: org.apache.lucene.analysis.Analyzer

Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi,

 

for decorating, use the class AnalyzerWrapper. This has protected methods to override: wrapComponents(), wrapReader(). getWrappedAnalyzer() must return the analyzer you want to wrap.

 

See ShingleAnalyzerWrapper as an example: http://goo.gl/4DcBQS

 

Uwe

 

-----

Uwe Schindler

H.-H.-Meier-Allee 63, D-28213 Bremen

http://www.thetaphi.de <http://www.thetaphi.de/> 

eMail: uwe@thetaphi.de

 

From: DVHV Sekhar [mailto:dvhv_sekhar@yahoo.com.INVALID] 
Sent: Monday, August 25, 2014 9:11 AM
To: dev@lucene.apache.org; dev-subscribe@lucene.apache.org
Subject: org.apache.lucene.analysis.Analyzer

 

Please add public method Analyzer#createComponents(Analyzer analyzer, String fieldName,

      Reader reader) to org.apache.lucene.analysis.Analyzer

 

This required to decorate any existing analyzers. Or make existing createComponents method as public.

 

Thanks,

Sekhar