TagField is a tag-indexing field with simpler compression and tokenization. See http://redisearch.io/Tags/
| 143 | |
| 144 | |
| 145 | class 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 | |
| 171 | class VectorField(Field): |
no outgoing calls