K - the key typeV - the value typepublic static class CreateArgs.Builder<K,V> extends Object
CreateArgs.
As a final step the build() method needs to be executed to create the final CreateArgs instance.
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
CreateArgs<K,V> |
build() |
CreateArgs.Builder<K,V> |
defaultLanguage(DocumentLanguage language)
Set the default language for the documents in the index.
|
CreateArgs.Builder<K,V> |
defaultScore(double score)
Set the default score for the documents in the index.
|
CreateArgs.Builder<K,V> |
filter(V filter)
Set a filter for the index.
|
CreateArgs.Builder<K,V> |
languageField(K field)
Set the field that contains the language setting for the documents in the index.
|
CreateArgs.Builder<K,V> |
maxTextFields()
Set the maximum number of text fields in the index.
|
CreateArgs.Builder<K,V> |
noFields()
Set the no fields flag.
|
CreateArgs.Builder<K,V> |
noFrequency()
Set the no frequency flag.
|
CreateArgs.Builder<K,V> |
noHighlighting()
Set the no highlighting flag.
|
CreateArgs.Builder<K,V> |
noOffsets()
Set the no offsets flag.
|
CreateArgs.Builder<K,V> |
on(CreateArgs.TargetType targetType)
Set the
CreateArgs.TargetType type for the index. |
CreateArgs.Builder<K,V> |
payloadField(K field)
Set the field that contains the payload setting for the documents in the index.
|
CreateArgs.Builder<K,V> |
scoreField(K field)
Set the field that contains the score setting for the documents in the index.
|
CreateArgs.Builder<K,V> |
skipInitialScan()
Set the skip initial scan flag.
|
CreateArgs.Builder<K,V> |
stopWords(List<V> stopWords)
Set the index with a custom stopword list, to be ignored during indexing and search time.
|
CreateArgs.Builder<K,V> |
temporary(long seconds)
Set the temporary index expiration time in seconds.
|
CreateArgs.Builder<K,V> |
withPrefix(K prefix)
Add a prefix to the index.
|
CreateArgs.Builder<K,V> |
withPrefixes(List<K> prefixes)
Add a list of prefixes to the index.
|
public CreateArgs.Builder<K,V> on(CreateArgs.TargetType targetType)
CreateArgs.TargetType type for the index. Defaults to CreateArgs.TargetType.HASH.targetType - the target typeCreateArgs.Builder for the purpose of method chainingpublic CreateArgs.Builder<K,V> withPrefix(K prefix)
prefix - the prefixCreateArgs.Builder for the purpose of method chainingpublic CreateArgs.Builder<K,V> withPrefixes(List<K> prefixes)
prefixes - a List of prefixesCreateArgs.Builder for the purpose of method chainingpublic CreateArgs.Builder<K,V> filter(V filter)
filter - a filter expression with the full RediSearch aggregation expression languageCreateArgs.Builder for the purpose of method chainingpublic CreateArgs.Builder<K,V> defaultLanguage(DocumentLanguage language)
language - the default languageCreateArgs.Builder for the purpose of method chainingpublic CreateArgs.Builder<K,V> languageField(K field)
field - the language fieldCreateArgs.Builder for the purpose of method chainingpublic CreateArgs.Builder<K,V> defaultScore(double score)
score - the default scoreCreateArgs.Builder for the purpose of method chainingpublic CreateArgs.Builder<K,V> scoreField(K field)
field - the score fieldCreateArgs.Builder for the purpose of method chainingpublic CreateArgs.Builder<K,V> payloadField(K field)
field - the payload fieldCreateArgs.Builder for the purpose of method chainingpublic CreateArgs.Builder<K,V> maxTextFields()
CreateArgs.Builder for the purpose of method chainingpublic CreateArgs.Builder<K,V> temporary(long seconds)
skipInitialScan() to avoid costly scanning.
Warning: When temporary indexes expire, they drop all the records associated with them. FT.DROPINDEX was introduced
with a default of not deleting docs and a DD flag that enforced deletion. However, for temporary indexes, documents
are deleted along with the index. Historically, RediSearch used an FT.ADD command, which made a connection between
the document and the index. Then, FT.DROP, also a hystoric command, deleted documents by default. In version 2.x,
RediSearch indexes hashes and JSONs, and the dependency between the index and documents no longer exists.seconds - the temporary index expiration time in secondsCreateArgs.Builder for the purpose of method chainingpublic CreateArgs.Builder<K,V> noOffsets()
noHighlighting() is
set to true.CreateArgs.Builder for the purpose of method chainingpublic CreateArgs.Builder<K,V> noHighlighting()
CreateArgs.Builder for the purpose of method chainingpublic CreateArgs.Builder<K,V> noFields()
CreateArgs.Builder for the purpose of method chainingpublic CreateArgs.Builder<K,V> noFrequency()
CreateArgs.Builder for the purpose of method chainingpublic CreateArgs.Builder<K,V> skipInitialScan()
CreateArgs.Builder for the purpose of method chainingpublic CreateArgs.Builder<K,V> stopWords(List<V> stopWords)
stopWords - a list of stop wordsCreateArgs.Builder for the purpose of method chainingpublic CreateArgs<K,V> build()
Copyright © 2025 lettuce.io. All rights reserved.