Class SearchIndexSuggestionExtractor.Options

java.lang.Object
com.day.cq.search.suggest.builder.SearchIndexSuggestionExtractor.Options
All Implemented Interfaces:
Cloneable
Enclosing interface:
SearchIndexSuggestionExtractor

public static class SearchIndexSuggestionExtractor.Options extends Object implements Cloneable
Data object for holding all configuration options for SearchIndexSuggestionExtractor.buildIndex(Session, String, Options).
  • Field Details

    • maxSuggestions

      public int maxSuggestions
      Maximum number of suggestions per term. See also SuggestionIndex.index(java.util.List, int, boolean). Defaults to 10.
    • minimizeIndex

      public boolean minimizeIndex
      Whether the index should be minimized. That means (longer) term prefixes that result in only one suggestion should not be indexed; only the first prefix that will result in this single suggestion would be stored, but not for the remaining letters of the suggested word. See also SuggestionIndex.index(java.util.List, int, boolean). Defaults to true.
    • maxTerms

      public int maxTerms
      Maximum number of the most frequent terms to extract from the Lucene index. Use 0 or smaller for no limit. Defaults to 10000.
    • minFrequency

      public int minFrequency
      Minimum threshold for the frequence of a term to be included. Defaults to 2.
    • minTermLength

      public int minTermLength
      Minimum length in characters of a term to be included. Defaults to 3.
    • stopWordsFile

      public String stopWordsFile
      Path to a stop words file in the repository. These are terms that will be ignored if found in the Lucene index.

      This must be a text file containing one word per line; lines starting with "#" are ignored, as well as leading and trailing whitespace.

      To support multiple stop word files, please merge them in a new file and point to that one.

      Defaults to a built-in english stop words file at /libs/cq/search/content/suggest/stopwords/en.txt.

    • FULL_TEXT

      public static final String FULL_TEXT
      Property value for properties to use for addressing the node-scoped full text index.
      See Also:
    • properties

      public Set<String> properties
      JCR properties from which to extract the terms. Use FULL_TEXT for the node-scoped full text index. Defaults to text and title.
  • Constructor Details

    • Options

      public Options(boolean useDefaultProperties)
      Creates new Options.
      Parameters:
      useDefaultProperties - if the properties should be initialized with default values or not
  • Method Details