Class TextSearchInfo


public class TextSearchInfo extends Object
Encapsulates information about how to perform text searches over a field
  • Field Details


      public static final TextSearchInfo SIMPLE_MATCH_ONLY
      Defines indexing information for fields that support only simple match text queries

      public static final TextSearchInfo WHITESPACE_MATCH_ONLY
      Defines indexing information for fields that index as keywords, but split query input on whitespace to build disjunctions.

      public static final TextSearchInfo SIMPLE_MATCH_WITHOUT_TERMS
      Defines indexing information for fields that support simple match text queries without using the terms index
    • NONE

      public static final TextSearchInfo 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
      luceneFieldType - the lucene FieldType of the field to be searched
      similarity - defines which Similarity to use when searching. If set to null then the default Similarity will be used.
      searchAnalyzer - the search-time analyzer to use. May not be null
      searchQuoteAnalyzer - the search-time analyzer to use for phrase searches. May not be null
  • Method Details

    • getSimilarity

      public SimilarityProvider getSimilarity()
    • getSearchAnalyzer

      public NamedAnalyzer getSearchAnalyzer()
    • getSearchQuoteAnalyzer

      public NamedAnalyzer getSearchQuoteAnalyzer()
    • hasPositions

      public boolean hasPositions()
      whether or not this field supports positional queries
    • hasOffsets

      public boolean hasOffsets()
      whether or not this field has indexed offsets for highlighting
    • hasNorms

      public boolean hasNorms()
      whether or not this field has indexed norms
    • isTokenized

      public boolean isTokenized()
      whether or not this field is tokenized
    • termVectors

      public TextSearchInfo.TermVector termVectors()
      the type of term vectors available for this field