-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Query all document (_all_docs) from specific partition with filtering returns wrong total_rows value and document information #2496
Comments
The wrong number for curl -b AuthSession=my-session 127.0.0.1:5984/my_db/_partition/my_partition
{
"db_name": "my_db",
"sizes": {
"active": 996092,
"external": 1369131
},
"partition": "my_partition",
"doc_count": 1264,
"doc_del_count": 6
}
curl -b AuthSession=my-session 127.0.0.1:5984/my_db/_partition/my_partition/_design/my_design/_view/my_view
{
"total_rows": 2348,
"offset": 0,
"rows": [
// ...
]
} When using a view the |
Bumping this issue, still exists in 8/12/2022. Any direction on where to start working on this issue? Maybe I can help? |
Hi, maybe you can start investigating the issue by following the partition request. |
Description
During the usage of
POST /{db}/_partition/{partition_key}/_all_docs
in the response there is a fieldtotal_rows
and its value should return the number of documents in the shard range hosting that partition.Furthermore it should return only partition specific documents.
If there is
keys
filter included in the query, currently the request returns the number of documents in the database and all partition related document that matches with the filter. There is no partition filtering.Steps to Reproduce
POST /{db}/_partition/{partition_key}/_all_docs --data-raw {}
It shall return atotal_rows
value. Let's call itn
.Returns all partition specific document.
POST /{db}/_partition/part2/_all_docs --data-raw {"keys":["part1:doc1", "part2:doc1"]}
In this case the
total_rows
of the response contains the number of all document of the database .In the request the following can be seen:
Expected Behaviour
The
total_rows
field should have valuen
.Only partition specific document information should be returned.
This should be the expected response:
Your Environment
Additional Context
The text was updated successfully, but these errors were encountered: