LUCENE-5803: Add more Javadocs to AnalyzerWrapper to encourage people to use DelegatingAnalyzerWrapper (if possible). Add changes entry for Solr.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1608005 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2014-07-05 12:19:51 +00:00
parent 4cdfa19970
commit afe033878a
2 changed files with 23 additions and 4 deletions

View File

@ -22,13 +22,24 @@ import java.io.Reader;
/**
* Extension to {@link Analyzer} suitable for Analyzers which wrap
* other Analyzers.
* <p/>
* {@link #getWrappedAnalyzer(String)} allows the Analyzer
*
* <p>{@link #getWrappedAnalyzer(String)} allows the Analyzer
* to wrap multiple Analyzers which are selected on a per field basis.
* <p/>
* {@link #wrapComponents(String, Analyzer.TokenStreamComponents)} allows the
*
* <p>{@link #wrapComponents(String, Analyzer.TokenStreamComponents)} allows the
* TokenStreamComponents of the wrapped Analyzer to then be wrapped
* (such as adding a new {@link TokenFilter} to form new TokenStreamComponents.
*
* <p>{@link #wrapReader(String, Reader)} allows the Reader of the wrapped
* Analyzer to then be wrapped (such as adding a new {@link CharFilter}.
*
* <p><b>Important:</b> If you do not want to wrap the TokenStream
* using {@link #wrapComponents(String, Analyzer.TokenStreamComponents)}
* or the Reader using {@link #wrapReader(String, Reader)} and just delegate
* to other analyzers (like by field name), use {@link DelegatingAnalyzerWrapper}
* as superclass!
*
* @see DelegatingAnalyzerWrapper
*/
public abstract class AnalyzerWrapper extends Analyzer {

View File

@ -158,6 +158,14 @@ Bug Fixes
* SOLR-6223: SearchComponents may throw NPE when using shards.tolerant and there is a failure
in the 'GET_FIELDS/GET_HIGHLIGHTS/GET_DEBUG' phase. (Tomás Fernández Löbbe via shalin)
Optimizations
---------------------
* LUCENE-5803: Solr's schema now uses DelegatingAnalyzerWrapper. This uses less heap
for cached TokenStreamComponents because it caches per FieldType not per Field, so
indexes with many fields of same type just use one TokenStream per thread.
(Shay Banon, Uwe Schindler, Robert Muir)
Other Changes
---------------------