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.Set the field name.sortable()
Make this field sortable (equivalent to sortable(true)).sortable
(boolean sortable) Set whether this field should be sortable.Set 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
-
build
Build the NumericField instance.- Returns:
- The configured NumericField
- Throws:
IllegalArgumentException
- if the field name is null or empty
-