Class GeoField.GeoFieldBuilder

java.lang.Object
com.redis.vl.schema.GeoField.GeoFieldBuilder
Enclosing class:
GeoField

public static class GeoField.GeoFieldBuilder extends Object
Fluent builder for GeoField
  • Method Details

    • name

      public GeoField.GeoFieldBuilder name(String name)
      Set the field name.
      Parameters:
      name - The name for this field
      Returns:
      This builder for chaining
    • alias

      public GeoField.GeoFieldBuilder alias(String alias)
      Set the field alias.
      Parameters:
      alias - The alias for this field
      Returns:
      This builder for chaining
    • withAlias

      public GeoField.GeoFieldBuilder withAlias(String alias)
      Set the field alias (alternative method name).
      Parameters:
      alias - The alias for this field
      Returns:
      This builder for chaining
    • indexed

      public GeoField.GeoFieldBuilder indexed(boolean indexed)
      Set whether the field is indexed.
      Parameters:
      indexed - True if the field should be indexed
      Returns:
      This builder for chaining
    • sortable

      public GeoField.GeoFieldBuilder sortable(boolean sortable)
      Set whether the field is sortable.
      Parameters:
      sortable - True if the field should be sortable
      Returns:
      This builder for chaining
    • sortable

      public GeoField.GeoFieldBuilder sortable()
      Make the field sortable.
      Returns:
      This builder for chaining
    • indexMissing

      public GeoField.GeoFieldBuilder indexMissing(boolean 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

      public GeoField.GeoFieldBuilder 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

      public GeoField build()
      Build the GeoField.
      Returns:
      A new GeoField instance
      Throws:
      IllegalArgumentException - if the field name is null or empty