Package redis.clients.jedis.search
Class Schema
java.lang.Object
redis.clients.jedis.search.Schema
Schema abstracts the schema definition when creating an index. Documents can contain fields not
mentioned in the schema, but the index will only index pre-defined fields
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumstatic classstatic classFullText field spec.static class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddField(Schema.Field field) addFlatVectorField(String name, Map<String, Object> attributes) addGeoField(String name) Add a geo filtering field to the schema.addHNSWVectorField(String name, Map<String, Object> attributes) addNumericField(String name) Add a numeric field to the schemaaddSortableTagField(String name, boolean caseSensitive) addSortableTagField(String name, String separator) addSortableTagField(String name, String separator, boolean caseSensitive) addSortableTextField(String name, double weight) Add a text field that can be sorted onaddTagField(String name) addTagField(String name, boolean caseSensitive) addTagField(String name, String separator) addTagField(String name, String separator, boolean caseSensitive) addTextField(String name, double weight) Add a text field to the schema with a given weightaddVectorField(String name, Schema.VectorField.VectorAlgo algorithm, Map<String, Object> attributes) Chain as name to the last filed added to the schemastatic Schemafrom(Schema.Field... fields) toString()
-
Field Details
-
fields
Deprecated.
-
-
Constructor Details
-
Schema
public Schema()
-
-
Method Details
-
from
-
addTextField
Add a text field to the schema with a given weight- Parameters:
name- the field's nameweight- its weight, a positive floating point number- Returns:
- the schema object
-
addSortableTextField
Add a text field that can be sorted on- Parameters:
name- the field's nameweight- its weight, a positive floating point number- Returns:
- the schema object
-
addGeoField
Add a geo filtering field to the schema.- Parameters:
name- the field's name- Returns:
- the schema object
-
addNumericField
Add a numeric field to the schema- Parameters:
name- the fields's nam e- Returns:
- the schema object
-
addSortableNumericField
-
addTagField
-
addTagField
-
addTagField
-
addTagField
-
addSortableTagField
-
addSortableTagField
-
addSortableTagField
-
addVectorField
-
addFlatVectorField
-
addHNSWVectorField
-
addField
-
as
Chain as name to the last filed added to the schema- Parameters:
attribute-
-
toString
-