-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Search using filters not working correctly #3178
Comments
Elevate this issue from @imkarthikk, don't hesitate to give us additional information about your own issue. related to several discord support discussions: |
I'll try to double-check today to be sure, but I think this bug is caused by the same "corrupted database" issue causing #3165 and fixed by meilisearch/milli#712 |
3202: Bump milli to v0.37.1 r=curquiza a=Kerollmops This PR bumps milli to v0.37.1 and fixes #3167, #3178, #3165, and #3021. 3203: Update version for the next release (v0.30.1) in Cargo.toml files r=Kerollmops a=meili-bot⚠️ This PR is automatically generated. Check the new version is the expected one before merging. Co-authored-by: Kerollmops <clement@meilisearch.com> Co-authored-by: curquiza <curquiza@users.noreply.github.com>
Fixed by #3202, will be released in v0.30.1 today! |
@curquiza Incredible. Thanks for the effort guys 👏 |
Hi everyone, I am very sorry, but the update to v0.30.1 did not completely fix this issue. Most of the missing filter results were indeed caused by a corrupted database, as I suspected. However, I then found another bug in the search algorithms that could cause a filter to miss some documents. We will quickly prepare a v0.30.2 (sigh...) containing a fix for this new bug as well. Thank you so much for the bug reports, we will try to do better in the future ❤️ |
727: Fix bug in filter search r=Kerollmops a=loiclec # Pull Request ## Related issue Fixes (partially, until merged into meilisearch) meilisearch/meilisearch#3178 ## What does this PR do? The most important change is this one: ```rust // in milli/src/search/facet/facet_range_search.rs, line 239 let should_stop = { match self.right { Bound::Included(right) => right < previous_key.left_bound, Bound::Excluded(right) => right <= previous_key.left_bound, Bound::Unbounded => false, } }; ``` where the operations `<` and `<=` between the two branches were switched. This caused (very few) documents to be missing from filter results. The second change is a simplification of the algorithm for filters such as `field = value`, where we now perform a direct query into the "Level 0" of the facet db to retrieve the docids instead of invoking the full facet search algorithm. This change is done in `milli/src/search/facet/filter.rs`. I have added yet more insta-snapshot tests, rechecked the content of the snapshots, and added some integration tests as well. This is purely a fix in the search algorithms. Based on this PR alone, a dump will not be necessary to switch from v0.30.1 (where this bug is present) to v0.30.2 (where this PR is merged). Co-authored-by: Loïc Lecrenier <loic.lecrenier@me.com>
Fixed by #3217, will be released today in v0.30.2 |
Describe the bug
I have an index of users with ~250k documents.
All documents are correctly imported (number of documents in /stats reflects the count in my DB).
When I search for users using filters, with different values, sometimes it returns the expected documents, sometimes an empty result.
To Reproduce
Steps to reproduce the behavior:
fk_active_company
filter. Result is empty.Expected behavior
Search with filters should work at any time.
Meilisearch version: v0.30.0
Additional context
Infra: AWS Meilisearch AMI v0.30.0 on a
c5.large
instance.TODO
main
The text was updated successfully, but these errors were encountered: