Class SearchIndexSuggestionExtractor.Options
- java.lang.Object
-
- com.day.cq.search.suggest.builder.SearchIndexSuggestionExtractor.Options
-
- All Implemented Interfaces:
java.lang.Cloneable
- Enclosing interface:
- SearchIndexSuggestionExtractor
public static class SearchIndexSuggestionExtractor.Options extends java.lang.Object implements java.lang.CloneableData object for holding all configuration options forSearchIndexSuggestionExtractor.buildIndex(Session, String, Options).
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringFULL_TEXTProperty value forpropertiesto use for addressing the node-scoped full text index.intmaxSuggestionsMaximum number of suggestions per term.intmaxTermsMaximum number of the most frequent terms to extract from the Lucene index.intminFrequencyMinimum threshold for the frequence of a term to be included.booleanminimizeIndexWhether the index should be minimized.intminTermLengthMinimum length in characters of a term to be included.java.util.Set<java.lang.String>propertiesJCR properties from which to extract the terms.java.lang.StringstopWordsFilePath to a stop words file in the repository.
-
Constructor Summary
Constructors Constructor Description Options(boolean useDefaultProperties)Creates new Options.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchIndexSuggestionExtractor.Optionsclone()
-
-
-
Field Detail
-
maxSuggestions
public int maxSuggestions
Maximum number of suggestions per term. See alsoSuggestionIndex.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 alsoSuggestionIndex.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 forpropertiesto 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. UseFULL_TEXTfor the node-scoped full text index. Defaults totextandtitle.
-
-
Constructor Detail
-
Options
public Options(boolean useDefaultProperties)
Creates new Options.- Parameters:
useDefaultProperties- if thepropertiesshould be initialized with default values or not
-
-
Method Detail
-
clone
public SearchIndexSuggestionExtractor.Options clone()
-
-