java.lang.Object
java.lang.Record
org.elasticsearch.index.mapper.TextSearchInfo
public record TextSearchInfo(org.apache.lucene.document.FieldType luceneFieldType, SimilarityProvider similarity, NamedAnalyzer searchAnalyzer, NamedAnalyzer searchQuoteAnalyzer)
extends Record
Encapsulates information about how to perform text searches over a field
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
What sort of term vectors are available -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TextSearchInfo
Specifies that this field does not support text searching of any kindstatic final TextSearchInfo
Defines indexing information for fields that support only simple match text queriesstatic final TextSearchInfo
Defines indexing information for fields that support simple match text queries without using the terms indexstatic final TextSearchInfo
Defines indexing information for fields that index as keywords, but split query input on whitespace to build disjunctions. -
Constructor Summary
ConstructorsConstructorDescriptionTextSearchInfo
(org.apache.lucene.document.FieldType luceneFieldType, SimilarityProvider similarity, NamedAnalyzer searchAnalyzer, NamedAnalyzer searchQuoteAnalyzer) Create a new TextSearchInfo -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
hasNorms()
boolean
boolean
boolean
org.apache.lucene.document.FieldType
Returns the value of theluceneFieldType
record component.Returns the value of thesearchAnalyzer
record component.Returns the value of thesearchQuoteAnalyzer
record component.Returns the value of thesimilarity
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
SIMPLE_MATCH_ONLY
Defines indexing information for fields that support only simple match text queries -
WHITESPACE_MATCH_ONLY
Defines indexing information for fields that index as keywords, but split query input on whitespace to build disjunctions. -
SIMPLE_MATCH_WITHOUT_TERMS
Defines indexing information for fields that support simple match text queries without using the terms index -
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.searchAnalyzer
- the search-time analyzer to use. May not benull
searchQuoteAnalyzer
- the search-time analyzer to use for phrase searches. May not benull
-
-
Method Details
-
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
-
termVectors
- Returns:
- the type of term vectors available for this field
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
luceneFieldType
public org.apache.lucene.document.FieldType luceneFieldType()Returns the value of theluceneFieldType
record component.- Returns:
- the value of the
luceneFieldType
record component
-
similarity
Returns the value of thesimilarity
record component.- Returns:
- the value of the
similarity
record component
-
searchAnalyzer
Returns the value of thesearchAnalyzer
record component.- Returns:
- the value of the
searchAnalyzer
record component
-
searchQuoteAnalyzer
Returns the value of thesearchQuoteAnalyzer
record component.- Returns:
- the value of the
searchQuoteAnalyzer
record component
-