Package org.elasticsearch.index.mapper
Class TextSearchInfo
java.lang.Object
org.elasticsearch.index.mapper.TextSearchInfo
public class TextSearchInfo
extends java.lang.Object
Encapsulates information about how to perform text searches over a field
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TextSearchInfo.TermVector
What sort of term vectors are available -
Field Summary
Fields Modifier and Type Field Description static TextSearchInfo
NONE
Specifies that this field does not support text searching of any kindstatic TextSearchInfo
SIMPLE_MATCH_ONLY
Defines indexing information for fields that support only simple match text queries Note that the results ofisStored()
for this may not be accuratestatic TextSearchInfo
WHITESPACE_MATCH_ONLY
Defines indexing information for fields that index as keywords, but split query input on whitespace to build disjunctions. -
Constructor Summary
Constructors Constructor Description TextSearchInfo(org.apache.lucene.document.FieldType luceneFieldType, SimilarityProvider similarity, NamedAnalyzer searchAnalyzer, NamedAnalyzer searchQuoteAnalyzer)
Create a new TextSearchInfo -
Method Summary
Modifier and Type Method Description NamedAnalyzer
getSearchAnalyzer()
NamedAnalyzer
getSearchQuoteAnalyzer()
SimilarityProvider
getSimilarity()
boolean
hasNorms()
boolean
hasOffsets()
boolean
hasPositions()
boolean
isStored()
boolean
isTokenized()
TextSearchInfo.TermVector
termVectors()
-
Field Details
-
SIMPLE_MATCH_ONLY
Defines indexing information for fields that support only simple match text queries Note that the results ofisStored()
for this may not be accurate -
WHITESPACE_MATCH_ONLY
Defines indexing information for fields that index as keywords, but split query input on whitespace to build disjunctions. Note that the results ofisStored()
for this may not be accurate -
NONE
Specifies that this field does not support text searching of any kind
-
-
Constructor Details
-
TextSearchInfo
public TextSearchInfo(org.apache.lucene.document.FieldType luceneFieldType, SimilarityProvider similarity, NamedAnalyzer searchAnalyzer, NamedAnalyzer searchQuoteAnalyzer)Create a new TextSearchInfo- Parameters:
luceneFieldType
- the luceneFieldType
of the field to be searchedsimilarity
- defines which Similarity to use when searching. If set tonull
then the default Similarity will be used.
-
-
Method Details
-
getSimilarity
-
getSearchAnalyzer
-
getSearchQuoteAnalyzer
-
hasPositions
public boolean hasPositions()- Returns:
- whether or not this field supports positional queries
-
hasOffsets
public boolean hasOffsets()- Returns:
- whether or not this field has indexed offsets for highlighting
-
hasNorms
public boolean hasNorms()- Returns:
- whether or not this field has indexed norms
-
isTokenized
public boolean isTokenized()- Returns:
- whether or not this field is tokenized
-
isStored
public boolean isStored()- Returns:
- whether or not this field is stored
-
termVectors
- Returns:
- the type of term vectors available for this field
-