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

Inconsistent string and number faceted documents order #4409

Closed
Kerollmops opened this issue Feb 13, 2024 · 1 comment · Fixed by #4433
Closed

Inconsistent string and number faceted documents order #4409

Kerollmops opened this issue Feb 13, 2024 · 1 comment · Fixed by #4433
Labels
bug Something isn't working as expected v1.7.0 PRs/issues solved in v1.7.0 released on 2024-03-11
Milestone

Comments

@Kerollmops
Copy link
Member

Kerollmops commented Feb 13, 2024

When modifying a small number of documents, they appear in the wrong order.

Related to #4374, #4339, and #4390.

To Reproduce
It happens when a few documents are modified in a bigger DB, so the incremental facet update kicks in.
The real fix is to rework the incremental facet update; many have started (or will start) work in this area.
A workaround is to do a 1.6.2 with incremental facet update disabled and only bulk facet update enabled.

Expected behavior
Faceted documents, when their facets are modified, must be ordered correctly, whether they are strings or numbers, which doesn't matter either.

Meilisearch version:
All versions with the incremental indexing: v1.6.0 and v1.6.1.

@Kerollmops Kerollmops added the bug Something isn't working as expected label Feb 13, 2024
@Kerollmops Kerollmops added this to the v1.6.2 milestone Feb 13, 2024
@Kerollmops Kerollmops modified the milestones: v1.6.2, v1.7.0 Feb 13, 2024
meili-bors bot added a commit that referenced this issue Feb 13, 2024
4408: Disable incremental facet update as a stop gap r=Kerollmops a=dureuill

# Pull Request

Temporarily disable incremental facet update to fix issue related with out-of-order sorts.

## Related issue

Workaround for #4409 

## What does this PR do?
- Always use bulk insert to insert facet values


Co-authored-by: Louis Dureuil <louis@meilisearch.com>
@ManyTheFish ManyTheFish linked a pull request Feb 22, 2024 that will close this issue
meili-bors bot added a commit that referenced this issue Feb 28, 2024
4433: Enhance facet incremental r=Kerollmops a=ManyTheFish

# Pull Request

## Related issue
Fixes #4367
Fixes #4409

## What does this PR do?

- Add a test reproducing #4409
- Fix #4409 by removing a document from a level only if it is no more present in all the linked sub-level nodes
- Optimize facet Incremental indexing by creating or deleting a complete level once per field id instead of for each facet value
- Optimize facet Incremental indexing by doing the additions and the deletions in the same process instead of doing them separately


Co-authored-by: ManyTheFish <many@meilisearch.com>
@curquiza
Copy link
Member

Fixed by #4433, will be release in v1.7.0-rc.2

@meili-bot meili-bot added the v1.7.0 PRs/issues solved in v1.7.0 released on 2024-03-11 label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected v1.7.0 PRs/issues solved in v1.7.0 released on 2024-03-11
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants