Package com.redis.vl.schema
Class NumericField.NumericFieldBuilder
java.lang.Object
com.redis.vl.schema.NumericField.NumericFieldBuilder
- Enclosing class:
NumericField
Fluent builder for NumericField
-
Method Summary
Modifier and TypeMethodDescriptionSet the field alias.build()Build the NumericField instance.indexed(boolean indexed) Set whether this field should be indexed.Index missing values (equivalent to indexMissing(true)).indexMissing(boolean indexMissing) Set whether to index missing values (documents without this field).Set the field name.sortable()Make this field sortable (equivalent to sortable(true)).sortable(boolean sortable) Set whether this field should be sortable.unf()Use un-normalized form for sorting (equivalent to unf(true))unf(boolean unf) Set whether to use un-normalized form for sortingSet the field alias (alias for alias() method).
-
Method Details
-
name
Set the field name.- Parameters:
name- The name for this field- Returns:
- This builder for chaining
-
alias
Set the field alias.- Parameters:
alias- The alias for this field- Returns:
- This builder for chaining
-
withAlias
Set the field alias (alias for alias() method).- Parameters:
alias- The alias for this field- Returns:
- This builder for chaining
-
indexed
Set whether this field should be indexed.- Parameters:
indexed- True to index this field, false otherwise- Returns:
- This builder for chaining
-
sortable
Set whether this field should be sortable.- Parameters:
sortable- True to make this field sortable, false otherwise- Returns:
- This builder for chaining
-
sortable
Make this field sortable (equivalent to sortable(true)).- Returns:
- This builder for chaining
-
unf
Set whether to use un-normalized form for sortingUNF disables normalization when sorting, preserving original values. Only applies when sortable=true.
NOTE: Jedis doesn't support sortableUNF() for NumericField yet, so this flag is stored but not passed to Redis.
- Parameters:
unf- True to disable normalization for sorting- Returns:
- This builder for chaining
-
unf
Use un-normalized form for sorting (equivalent to unf(true))UNF disables normalization when sorting, preserving original values. Only applies when sortable=true.
NOTE: Jedis doesn't support sortableUNF() for NumericField yet, so this flag is stored but not passed to Redis.
- Returns:
- This builder for chaining
-
indexMissing
Set whether to index missing values (documents without this field).When enabled, allows searching for documents where this field is missing using the ismissing() filter.
- Parameters:
indexMissing- True to index missing values- Returns:
- This builder for chaining
-
indexMissing
Index missing values (equivalent to indexMissing(true)).When enabled, allows searching for documents where this field is missing using the ismissing() filter.
- Returns:
- This builder for chaining
-
build
Build the NumericField instance.- Returns:
- The configured NumericField
- Throws:
IllegalArgumentException- if the field name is null or empty
-