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
{db}/_design_docs/queries gives back non design documents too with 'keys' property #2851
Comments
paging @tonysun83 @garrensmith |
PR #4494 should have fixed this issue for single keys. $ curl -X DELETE http://adm:pass@127.0.0.1:15984/db
$ curl -X PUT http://adm:pass@127.0.0.1:15984/db
{"ok":true}
$ curl -X POST http://adm:pass@127.0.0.1:15984/db/_bulk_docs'?=' \
-H 'Content-Type: application/json' \
-d '{"docs": [{"_id": "_design/user-emails","views": {"getVerifiedEmails": {"map": "function(doc) {if(doc.email_verified && doc.email_verified == true){\n emit(doc.email, [doc.name, doc.email_verified, doc.joined]) }}"}}},{"_id": "abc123","type": "user","email": "amelie.smith@aol.com","email_verified": true}]}'
[{"ok":true,"id":"_design/user-emails","rev":"1-840ca986e193b3f5df84da0befe09af6"},{"ok":true,"id":"abc123","rev":"1-3e0944abf21b22d8d6fe70002edc2e82"}]
$ curl -X POST http://adm:pass@127.0.0.1:15984/db/_design_docs/queries'?=' \
-H 'Content-Type: application/json' \
-d '{"queries": [{"keys": ["abc123"]}]}'
{"results":[{"total_rows":1,"offset":1,"rows":[]}]} |
jiahuili430
added a commit
to jiahuili430/couchdb
that referenced
this issue
Jul 20, 2023
Querying design/local docs with `keys` should only return design/local docs. Fixed: apache#2851
5 tasks
nickva
pushed a commit
that referenced
this issue
Jul 20, 2023
Querying design/local docs with `keys` should only return design/local docs. Fixed: #2851
big-r81
pushed a commit
that referenced
this issue
Jul 23, 2023
Querying design/local docs with `keys` should only return design/local docs. Fixed: #2851
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When I query design docs against
{db}/_design_docs/queries
withkeys
array that contains document id-s which are not design documents, response will have those non-design documents.Steps to Reproduce
keys
property:Expected Behaviour
The response should contain nothing, like when I use the
key
property:Response:
Your Environment
The text was updated successfully, but these errors were encountered: