Package org.apache.solr.handler
Class AnalysisRequestHandlerBase.AnalysisContext
- java.lang.Object
-
- org.apache.solr.handler.AnalysisRequestHandlerBase.AnalysisContext
-
- Enclosing class:
- AnalysisRequestHandlerBase
protected static class AnalysisRequestHandlerBase.AnalysisContext extends Object
Serves as the context of an analysis process. This context contains the following constructs
-
-
Constructor Summary
Constructors Constructor Description AnalysisContext(String fieldName, FieldType fieldType, org.apache.lucene.analysis.Analyzer analyzer)
Constructs an AnalysisContext with a given field name, field type and analyzer.AnalysisContext(String fieldName, FieldType fieldType, org.apache.lucene.analysis.Analyzer analyzer, Set<org.apache.lucene.util.BytesRef> termsToMatch)
Constructs a new AnalysisContext with a given field tpe, analyzer and termsToMatch.AnalysisContext(FieldType fieldType, org.apache.lucene.analysis.Analyzer analyzer, Set<org.apache.lucene.util.BytesRef> termsToMatch)
Constructs a new AnalysisContext with a given field tpe, analyzer and termsToMatch.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.lucene.analysis.Analyzer
getAnalyzer()
String
getFieldName()
FieldType
getFieldType()
Set<org.apache.lucene.util.BytesRef>
getTermsToMatch()
-
-
-
Constructor Detail
-
AnalysisContext
public AnalysisContext(FieldType fieldType, org.apache.lucene.analysis.Analyzer analyzer, Set<org.apache.lucene.util.BytesRef> termsToMatch)
Constructs a new AnalysisContext with a given field tpe, analyzer and termsToMatch. By default the field name in this context will benull
. During the analysis processs, The produced tokens will be compaired to the terms in thetermsToMatch
set. When found, these tokens will be marked as a match.- Parameters:
fieldType
- The type of the field the analysis is performed on.analyzer
- The analyzer to be used.termsToMatch
- Holds all the terms that should match during the analysis process.
-
AnalysisContext
public AnalysisContext(String fieldName, FieldType fieldType, org.apache.lucene.analysis.Analyzer analyzer)
Constructs an AnalysisContext with a given field name, field type and analyzer. By default this context will hold no terms to match- Parameters:
fieldName
- The name of the field the analysis is performed on (may benull
).fieldType
- The type of the field the analysis is performed on.analyzer
- The analyzer to be used during the analysis process.
-
AnalysisContext
public AnalysisContext(String fieldName, FieldType fieldType, org.apache.lucene.analysis.Analyzer analyzer, Set<org.apache.lucene.util.BytesRef> termsToMatch)
Constructs a new AnalysisContext with a given field tpe, analyzer and termsToMatch. During the analysis processs, The produced tokens will be compared to the terms in thetermsToMatch
set. When found, these tokens will be marked as a match.- Parameters:
fieldName
- The name of the field the analysis is performed on (may benull
).fieldType
- The type of the field the analysis is performed on.analyzer
- The analyzer to be used.termsToMatch
- Holds all the terms that should match during the analysis process.
-
-