Class TextField.TextFieldBuilder

java.lang.Object
com.redis.vl.schema.TextField.TextFieldBuilder
Enclosing class:
TextField

public static class TextField.TextFieldBuilder extends Object
Fluent builder for TextField
  • Method Details

    • name

      public TextField.TextFieldBuilder name(String name)
      Set the field name
      Parameters:
      name - Field name
      Returns:
      This builder
    • alias

      public TextField.TextFieldBuilder alias(String alias)
      Set the field alias
      Parameters:
      alias - Field alias
      Returns:
      This builder
    • withAlias

      public TextField.TextFieldBuilder withAlias(String alias)
      Set the field alias (alternative method)
      Parameters:
      alias - Field alias
      Returns:
      This builder
    • indexed

      public TextField.TextFieldBuilder indexed(boolean indexed)
      Set whether the field is indexed
      Parameters:
      indexed - True if indexed
      Returns:
      This builder
    • sortable

      public TextField.TextFieldBuilder sortable(boolean sortable)
      Set whether the field is sortable
      Parameters:
      sortable - True if sortable
      Returns:
      This builder
    • sortable

      public TextField.TextFieldBuilder sortable()
      Set the field as sortable
      Returns:
      This builder
    • weight

      public TextField.TextFieldBuilder weight(double weight)
      Set the weight for scoring in full-text search
      Parameters:
      weight - Weight value
      Returns:
      This builder
    • withWeight

      public TextField.TextFieldBuilder withWeight(double weight)
      Set the weight for scoring in full-text search (alternative method)
      Parameters:
      weight - Weight value
      Returns:
      This builder
    • noStem

      public TextField.TextFieldBuilder noStem(boolean noStem)
      Set whether to disable stemming
      Parameters:
      noStem - True to disable stemming
      Returns:
      This builder
    • noStem

      public TextField.TextFieldBuilder noStem()
      Disable stemming for this field
      Returns:
      This builder
    • phonetic

      public TextField.TextFieldBuilder phonetic(String phonetic)
      Set the phonetic matcher
      Parameters:
      phonetic - Phonetic matcher (e.g., "dm:en" for Double Metaphone English)
      Returns:
      This builder
    • withPhonetic

      public TextField.TextFieldBuilder withPhonetic(String phonetic)
      Set the phonetic matcher (alternative method)
      Parameters:
      phonetic - Phonetic matcher (e.g., "dm:en" for Double Metaphone English)
      Returns:
      This builder
    • build

      public TextField build()
      Build the TextField
      Returns:
      TextField instance