Class SearchIndexSuggestionExtractor.Options

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String FULL_TEXT
      Property value for properties to use for addressing the node-scoped full text index.
      int maxSuggestions
      Maximum number of suggestions per term.
      int maxTerms
      Maximum number of the most frequent terms to extract from the Lucene index.
      int minFrequency
      Minimum threshold for the frequence of a term to be included.
      boolean minimizeIndex
      Whether the index should be minimized.
      int minTermLength
      Minimum length in characters of a term to be included.
      java.util.Set<java.lang.String> properties
      JCR properties from which to extract the terms.
      java.lang.String stopWordsFile
      Path to a stop words file in the repository.
    • Constructor Summary

      Constructors 
      Constructor Description
      Options​(boolean useDefaultProperties)
      Creates new Options.
    • Field Detail

      • 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 java.lang.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 java.lang.String FULL_TEXT
        Property value for properties to use for addressing the node-scoped full text index.
        See Also:
        Constant Field Values
      • properties

        public java.util.Set<java.lang.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 Detail

      • Options

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