Enum Class FieldType

java.lang.Object
java.lang.Enum<FieldType>
com.redis.vl.schema.FieldType
All Implemented Interfaces:
Serializable, Comparable<FieldType>, Constable

public enum FieldType extends Enum<FieldType>
Enumeration of field types supported by RedisVL. Maps to Redis RediSearch field types.
  • Enum Constant Details

    • TEXT

      public static final FieldType TEXT
      Text field for full-text search
    • TAG

      public static final FieldType TAG
      Tag field for exact matching
    • NUMERIC

      public static final FieldType NUMERIC
      Numeric field for range queries
    • GEO

      public static final FieldType GEO
      Geo field for geographic queries
    • VECTOR

      public static final FieldType VECTOR
      Vector field for similarity search
  • Method Details

    • values

      public static FieldType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FieldType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromRedisType

      public static FieldType fromRedisType(String redisType)
      Get the FieldType from its Redis type name.
      Parameters:
      redisType - The Redis type name (e.g., "text", "tag", "numeric")
      Returns:
      The corresponding FieldType
      Throws:
      IllegalArgumentException - if the Redis type is unknown