redis / redis-om-python

Object mapping, and more, for Redis and Python
MIT License
1.06k stars 108 forks source link

Full text search not working on tag fields #585

Closed Joybaruah closed 2 months ago

Joybaruah commented 5 months ago

id: str = Field(index=True, full_text_search=True, primary_key=True)

This fields creates schema as: ON JSON PREFIX 1 :index: SCHEMA $.id AS id TAG SEPARATOR | $.id AS id_fts TEXT

Query: Model.id % id

This doesn't work

slorello89 commented 3 months ago

Interesting, are you getting an error, or is it just not producing the result you expected. An ID is kind of an odd thing to do a full-text search on (I could see doing a prefix/infix/postfix search but not really full text search)

Joybaruah commented 3 months ago

Not producing the result, It is not odd as In case of Unique ID length 6-10.

slorello89 commented 2 months ago

What really is needed here is the addition of x-fix style queries, what you are looking for is not full text search,. I've opened #610 to resolve.