Class NumericField.NumericFieldBuilder

java.lang.Object
com.redis.vl.schema.NumericField.NumericFieldBuilder
Enclosing class:
NumericField

public static class NumericField.NumericFieldBuilder extends Object
Fluent builder for NumericField
  • 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

      public NumericField.NumericFieldBuilder withAlias(String alias)
      Set the field alias (alias for alias() method).
      Parameters:
      alias - The alias for this field
      Returns:
      This builder for chaining
    • indexed

      public NumericField.NumericFieldBuilder indexed(boolean indexed)
      Set whether this field should be indexed.
      Parameters:
      indexed - True to index this field, false otherwise
      Returns:
      This builder for chaining
    • sortable

      public NumericField.NumericFieldBuilder sortable(boolean 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

      public NumericField build()
      Build the NumericField instance.
      Returns:
      The configured NumericField
      Throws:
      IllegalArgumentException - if the field name is null or empty