MCPcopy
hub / github.com/redis/redis-py / TagField

Class TagField

redis/commands/search/field.py:145–168  ·  view source on GitHub ↗

TagField is a tag-indexing field with simpler compression and tokenization. See http://redisearch.io/Tags/

Source from the content-addressed store, hash-verified

143
144
145class TagField(Field):
146 """
147 TagField is a tag-indexing field with simpler compression and tokenization.
148 See http://redisearch.io/Tags/
149 """
150
151 SEPARATOR = "SEPARATOR"
152 CASESENSITIVE = "CASESENSITIVE"
153
154 def __init__(
155 self,
156 name: str,
157 separator: str = ",",
158 case_sensitive: bool = False,
159 withsuffixtrie: bool = False,
160 **kwargs,
161 ):
162 args = [Field.TAG, self.SEPARATOR, separator]
163 if case_sensitive:
164 args.append(self.CASESENSITIVE)
165 if withsuffixtrie:
166 args.append("WITHSUFFIXTRIE")
167
168 Field.__init__(self, name, args=args, **kwargs)
169
170
171class VectorField(Field):

Callers 15

search_vss.pyFile · 0.90
home_json.pyFile · 0.90
query_agg.pyFile · 0.90
query_em.pyFile · 0.90
query_range.pyFile · 0.90
query_combined.pyFile · 0.90
test_no_indexMethod · 0.90
test_casesensitiveMethod · 0.90
test_withsuffixtrieMethod · 0.90

Calls

no outgoing calls