couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-2614) Selectors with {$eq: 'foo', $gte: 'foo'} cause 500 error
Date Wed, 25 Feb 2015 03:24:04 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-2614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14335937#comment-14335937
] 

ASF subversion and git services commented on COUCHDB-2614:
----------------------------------------------------------

Commit 698e3490e6ae5c0dc51cafe1dcbccfc0f1bf5819 in couchdb-mango's branch refs/heads/master
from [~tonysun83]
[ https://git-wip-us.apache.org/repos/asf?p=couchdb-mango.git;h=698e349 ]

Handle unsatisfiable [empty] ranges

Queries sometimes contain unsatisfiable ranges (i.e x < 0 and x > 0).
This is indicated by the [empty] value. In this case, we should not
perform a search and simply return 0 documents.

Fixes COUCHDB-2614


> Selectors with {$eq: 'foo', $gte: 'foo'} cause 500 error
> --------------------------------------------------------
>
>                 Key: COUCHDB-2614
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2614
>             Project: CouchDB
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Mango
>            Reporter: Nolan Lawson
>            Assignee: Tony Sun
>
> Steps to repro in curl:
> {code}
> MYDB=http://whatever.cloudant.com/somedb
> curl "$MYDB/_bulk_docs" -H 'Content-Type: application/json' --data-binary '{"new_edits":true,"docs":[{"name":"mario","_id":"mario","rank":5,"series":"mario","debut":1981},{"name":"jigglypuff","_id":"puff","rank":8,"series":"pokemon","debut":1996},{"name":"link","rank":10,"_id":"link","series":"zelda","debut":1986},{"name":"donkey
kong","rank":7,"_id":"dk","series":"mario","debut":1981},{"name":"pikachu","series":"pokemon","_id":"pikachu","rank":1,"debut":1996},{"name":"captain
falcon","_id":"falcon","rank":4,"series":"f-zero","debut":1990},{"name":"luigi","rank":11,"_id":"luigi","series":"mario","debut":1983},{"name":"fox","_id":"fox","rank":3,"series":"star
fox","debut":1993},{"name":"ness","rank":9,"_id":"ness","series":"earthbound","debut":1994},{"name":"samus","rank":12,"_id":"samus","series":"metroid","debut":1986},{"name":"yoshi","_id":"yoshi","rank":6,"series":"mario","debut":1990},{"name":"kirby","_id":"kirby","series":"kirby","rank":2,"debut":1992}]}'
> curl "$MYDB/_index" -H 'Content-Type: application/json' --data-binary '{"index":{"fields":["series"]}}'
> curl "$MYDB/_find" -H 'Content-Type: application/json' --data-binary '{"selector":{"$and":[{"series":{"$gte":"mario"}},{"series":{"$eq":"f-zero"}},{"series":{"$eq":"mario"}}]},"fields":["_id"]}'
> {code}
> The error I get back is:
> {code:javascript}
> {"error":"function_clause","reason":null,"ref":2609331215}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message