diff --git a/lucene/core/src/java/org/apache/lucene/analysis/AnalyzerWrapper.java b/lucene/core/src/java/org/apache/lucene/analysis/AnalyzerWrapper.java index 45ccadfed83..3c97438b891 100644 --- a/lucene/core/src/java/org/apache/lucene/analysis/AnalyzerWrapper.java +++ b/lucene/core/src/java/org/apache/lucene/analysis/AnalyzerWrapper.java @@ -22,13 +22,24 @@ import java.io.Reader; /** * Extension to {@link Analyzer} suitable for Analyzers which wrap * other Analyzers. - *

- * {@link #getWrappedAnalyzer(String)} allows the Analyzer + * + *

{@link #getWrappedAnalyzer(String)} allows the Analyzer * to wrap multiple Analyzers which are selected on a per field basis. - *

- * {@link #wrapComponents(String, Analyzer.TokenStreamComponents)} allows the + * + *

{@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. + * + *

{@link #wrapReader(String, Reader)} allows the Reader of the wrapped + * Analyzer to then be wrapped (such as adding a new {@link CharFilter}. + * + *

Important: 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 { diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index e654c02a84e..02fb5baa3fb 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -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 ---------------------