Skip to content

Fix full text search field indexing issue #43

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

Merged
merged 3 commits into from
Jan 7, 2022

Conversation

simonprickett
Copy link
Contributor

Adds field name alias to fix full text searches. Tested with HashModel.

Closes #42

Adds field name alias to fix full text searches.

Closes redis#42
@abrookins
Copy link
Collaborator

This seems right, but you'll need to update the schema tests. I'm also curious why there aren't tests that failed without this working...

@simonprickett
Copy link
Contributor Author

@abrookins good point about updating the tests, I'll give that a go and if successful will make a futher commit on this PR.

@simonprickett simonprickett self-assigned this Jan 5, 2022
@simonprickett simonprickett added the bug Something isn't working label Jan 5, 2022
@simonprickett
Copy link
Contributor Author

This seems right, but you'll need to update the schema tests. I'm also curious why there aren't tests that failed without this working...

Amended the schema tests and added a couple basic fuzzy queries for the hash model too.

@simonprickett
Copy link
Contributor Author

Test results after latest commit (I see same on main):

$ make test
...
FAILED tests/test_json_model.py::test_update_query - assert 0 == 3
FAILED tests/test_json_model.py::test_in_query - AssertionError: assert [] == [Member(pk='01FRP...
FAILED tests/test_json_model.py::test_tag_queries_boolean_logic - AssertionError: assert [] == ...
FAILED tests/test_json_model.py::test_recursive_query_expression_resolution - AssertionError: a...
FAILED tests/test_json_model.py::test_exact_match_queries - AssertionError: assert [] == [Membe...
FAILED tests/test_json_model.py::test_tag_queries_negation - AssertionError: assert [Member(pk=...
FAILED tests/test_json_model.py::test_recursive_query_field_resolution - AssertionError: assert...
FAILED tests/test_json_model.py::test_tag_queries_punctuation - aredis_om.model.model.NotFoundE...
FAILED tests/test_json_model.py::test_list_field_limitations - AssertionError: assert [] == [Ta...
FAILED tests_sync/test_json_model.py::test_exact_match_queries - AssertionError: assert [] == [...
FAILED tests_sync/test_json_model.py::test_update_query - assert 0 == 3
FAILED tests_sync/test_json_model.py::test_in_query - AssertionError: assert [] == [Member(pk='...
FAILED tests_sync/test_json_model.py::test_tag_queries_boolean_logic - AssertionError: assert [...
FAILED tests_sync/test_json_model.py::test_recursive_query_expression_resolution - AssertionErr...
FAILED tests_sync/test_json_model.py::test_recursive_query_field_resolution - AssertionError: a...
FAILED tests_sync/test_json_model.py::test_tag_queries_negation - AssertionError: assert [Membe...
FAILED tests_sync/test_json_model.py::test_tag_queries_punctuation - redis_om.model.model.NotFo...
FAILED tests_sync/test_json_model.py::test_list_field_limitations - AssertionError: assert [] =...
================================= 18 failed, 104 passed in 4.49s =================================
make: *** [Makefile:66: test] Error 1

@simonprickett
Copy link
Contributor Author

simonprickett commented Jan 6, 2022

I've double checked this against the versions of RediSearch/RedisJSON currently on Redis Enterprise cloud and it's working there too. Note that in order to use Redis OM Python with Redis Enterprise, #73 needs to be addressed separately.

@simonprickett simonprickett changed the title Attempts to fix full text search fields Fix full text search field indexing issue Jan 7, 2022
@simonprickett simonprickett merged commit 4a56ed2 into redis:main Jan 7, 2022
@simonprickett simonprickett deleted the patch-3 branch January 7, 2022 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Index isn't created correctly when using full text search field?
2 participants