Class CreateArgs
java.lang.Object
io.quarkus.redis.datasource.search.CreateArgs
- All Implemented Interfaces:
RedisCommandExtraArguments
Represents the argument of the
ft.create
command.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets a filter expression with the full RediSearch aggregation expression language.indexedField
(String field, FieldType type) Adds a field to the schema.indexedField
(String field, FieldType type, FieldOptions options) Adds a field to the schema.indexedField
(String field, String alias, FieldType type) Adds a field to the schema.indexedField
(String field, String alias, FieldType type, FieldOptions options) Adds a field to the schema.If set, indicates the default language for documents in the index.languageField
(String languageField) Set a document attribute used as the document language.Forces RediSearch to encode indexes as if there were more than 32 text attributes, which allows you to add additional attributes (beyond 32) usingFT.ALTER
.noFields()
Does not store attribute bits for each term.noFreqs()
Avoids saving the term frequencies in the index.noHl()
Conserves storage space and memory by disabling highlighting support.Sets to not store term offsets for documents.onHash()
Enables indexing hash objects.onJson()
Enable indexing JSON documents.payloadField
(String field) Sets the document attribute that you use as a binary safe payload string to the document that can be evaluated at query time by a custom scoring function or retrieved to the client.Tells the index which keys it should index.score
(double score) Set the default score for documents in the index.scoreField
(String field) Sets the document attribute that you use as the document rank based on the user ranking.If set, does not scan and index.Sets the index with a custom stop word list, to be ignored during indexing and search time.Creates a lightweight temporary index that expires after a specified period of inactivity.toArgs()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.quarkus.redis.datasource.RedisCommandExtraArguments
toArgs
-
Constructor Details
-
CreateArgs
public CreateArgs()
-
-
Method Details
-
onHash
Enables indexing hash objects.- Returns:
- the current
CreateArgs
-
onJson
Enable indexing JSON documents. To index JSON, you must have the RedisJSON module installed.- Returns:
- the current
CreateArgs
-
prefixes
Tells the index which keys it should index. You can add several prefixes to index. Because the argument is optional, the default is * (all keys).- Parameters:
prefixes
- the prefix of the keys- Returns:
- the current
CreateArgs
-
filter
Sets a filter expression with the full RediSearch aggregation expression language. It is possible to use @__key to access the key that was just added/changed. A field can be used to set field name by passing 'FILTER @indexName=="myindexname"'.- Parameters:
filter
- the filter- Returns:
- the current
CreateArgs
-
language
If set, indicates the default language for documents in the index. Default to English.- Parameters:
language
- the language- Returns:
- the current
CreateArgs
-
languageField
Set a document attribute used as the document language. A stemmer is used for the supplied language during indexing. If an unsupported language is sent, the command returns an error.- Parameters:
languageField
- the language field- Returns:
- the current
CreateArgs
-
score
Set the default score for documents in the index. Default score is 1.0.- Parameters:
score
- the score- Returns:
- the current
CreateArgs
-
scoreField
Sets the document attribute that you use as the document rank based on the user ranking. Ranking must be between 0.0 and 1.0. If not set, the default score is 1.- Parameters:
field
- the field- Returns:
- the current
CreateArgs
-
payloadField
Sets the document attribute that you use as a binary safe payload string to the document that can be evaluated at query time by a custom scoring function or retrieved to the client.- Parameters:
field
- the field- Returns:
- the current
CreateArgs
-
maxTextFields
Forces RediSearch to encode indexes as if there were more than 32 text attributes, which allows you to add additional attributes (beyond 32) usingFT.ALTER
. For efficiency, RediSearch encodes indexes differently if they are created with less than 32 text attributes.- Returns:
- the current
CreateArgs
-
noOffsets
Sets to not store term offsets for documents. It saves memory, but does not allow exact searches or highlighting. It impliesNOHL
.- Returns:
- the current
CreateArgs
-
temporary
Creates a lightweight temporary index that expires after a specified period of inactivity. The internal idle timer is reset whenever the index is searched or added to. Because such indexes are lightweight, you can create thousands of such indexes without negative performance implications and, therefore, you should consider usingSKIPINITIALSCAN
to avoid costly scanning.When dropped, a temporary index does not delete the hashes as they may have been indexed in several indexes. Adding the
DD
flag deletes the hashes as well.- Parameters:
duration
- the duration- Returns:
- the current
CreateArgs
-
noHl
Conserves storage space and memory by disabling highlighting support. If set, the corresponding byte offsets for term positions are not stored.NOHL
is also implied byNOOFFSETS
.- Returns:
- the current
CreateArgs
-
noFields
Does not store attribute bits for each term. It saves memory, but it does not allow filtering by specific attributes.- Returns:
- the current
CreateArgs
-
noFreqs
Avoids saving the term frequencies in the index. It saves memory, but does not allow sorting based on the frequencies of a given term within the document.- Returns:
- the current
CreateArgs
-
stopWords
Sets the index with a custom stop word list, to be ignored during indexing and search time.- Parameters:
words
- the stop word list- Returns:
- the current
CreateArgs
-
skipInitialScan
If set, does not scan and index.- Returns:
- the current
CreateArgs
-
indexedField
Adds a field to the schema.- Parameters:
field
- the fieldalias
- the alias, can benull
type
- the field typeoptions
- the additional options- Returns:
- the current
CreateArgs
-
indexedField
Adds a field to the schema.- Parameters:
field
- the fieldtype
- the field typeoptions
- the additional options- Returns:
- the current
CreateArgs
-
indexedField
Adds a field to the schema.- Parameters:
field
- the fieldtype
- the field type- Returns:
- the current
CreateArgs
-
indexedField
Adds a field to the schema.- Parameters:
field
- the fieldalias
- the alias, can benull
type
- the field type- Returns:
- the current
CreateArgs
-
toArgs
- Specified by:
toArgs
in interfaceRedisCommandExtraArguments
- Returns:
- the list of arguments.
-