[Bug]: incorrect order when using `sort` with nouveau on multiple shards
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
The issue is in the Nouveau search module when sorting string fields across shards. Start by examining the Python reproducer script to understand the test setup. Look at the CouchDB source code for the Nouveau search implementation, focusing on sorting logic and shard merging. Running the reproducer against a local CouchDB instance will verify the bug. 'Done' means the sort order is correct across shards in the test.
Written by the indexing model from the issue text.
Description
Version
3.5.2
Describe the problem you're encountering
Dear CouchDB team,
It seems that there is a doc ordering issue in the following context:
- using Nouveau search
- with
sorton astringfield - with matching documents located on different shards
You can then end up with results such as ["apple", "Zebra", "apple"]
Expected Behaviour
I would expect sorting to work for documents across shards.
Steps to Reproduce
Here is a minimal reproducer, created by @AlexanderKaraberov
nouveau_min_repro.py
Your Environment
I was able to reproduce the issue on CouchDB 3.5.0 and 3.5.2. It can be reproduced with the docker image apache/couchdb:3.5.0.
Additional Context
No response
- Dominant language
- Erlang
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 5h 24m
- Merged PRs (30d)
- 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/couchdb
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 40/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 40/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 45/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
enhancement needs-triage
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
TencentCloud/Octop#1128 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
silverstripe/silverstripe-framework#12022 · 2 comments ·