Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serious FT.GET bug #653

Closed
mluggy opened this issue Apr 11, 2019 · 6 comments
Closed

Serious FT.GET bug #653

mluggy opened this issue Apr 11, 2019 · 6 comments
Labels
Milestone

Comments

@mluggy
Copy link

mluggy commented Apr 11, 2019

redis 5.0.4 and redisearch 1.4.6. FT.GET ignores index name.

127.0.0.1:6379> FT.CREATE foo SCHEMA name TEXT
OK
127.0.0.1:6379> FT.ADD foo foo1 1 FIELDS name foo1-name
OK
127.0.0.1:6379> FT.GET foo foo1
1) "name"
2) "foo1-name"
127.0.0.1:6379> FT.CREATE bar SCHEMA whatever TEXT
OK
127.0.0.1:6379> FT.GET bar foo1
1) "name"
2) "foo1-name"
@mnunberg
Copy link
Contributor

This should be fixed in master. In any event, I'm unsure I'd consider this a serious bug, because the document is actually stored as a plain hash under the document name (unless the NOSAVE option is passed to FT.ADD)

@mluggy
Copy link
Author

mluggy commented Apr 17, 2019

how's this not a serious issue? the index name is ignored.

@mnunberg
Copy link
Contributor

Because you shouldn't have a document with the same name in multiple indexes anyway. Anyway, this has been fixed in master. I just didn't want to let off the impression that you can have a "doc1" in idx1 and a "doc1" in idx2

@mluggy
Copy link
Author

mluggy commented Apr 17, 2019

ok, now i get it. you look at redisearch as a way to index existing redis documents (which have unique keys), where i looked at it as a general purpose database where the key is composed of the index+docId.

so ft.add idx1 doc1 and ft.add idx2 doc1 simply make the same doc1 available on both indexes.

@mnunberg
Copy link
Contributor

mnunberg commented Apr 17, 2019 via email

@mluggy
Copy link
Author

mluggy commented Apr 17, 2019

yea, i wasn't aware. as mentioned I'm not handling any redis documents directly, only through redisearch. this started a journey that supposedly do this: https://twitter.com/mluggy/status/1057994312800198656

@emmanuelkeller emmanuelkeller added this to the 1.6.7 milestone Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants