Views can be used to look up a specific key or a contiguous range of
keys, the original poster is wrong to think that each item in the view
is separately queryable.

That said, [600,69] is greater than [400,50] and less than [1000, 100]
and so should be returned, even in 1.0.4.

B.


On 25 November 2013 22:16, Andy Wenk <a...@nms.de> wrote:
> I am not sure how it was in old 1.0.4. But is it a problem to upgrade to
> 1.5? 1.0.4 is really outdated ...
>
>
> On 25 November 2013 15:51, Qaqabincs <luji...@gmail.com> wrote:
>
>> hi, all,
>>
>> I use couchdb-1.0.4, and I use a design view:
>>
>> findBoys:{
>> map:function(doc) {
>> if(doc.boy){
>> emit([doc.boy.height,doc.boy.weight],doc);
>> };
>> }
>> }
>>
>> if I query this view via Futon, there are 13 boys on list, but if I set
>> a range to this view, such as:
>> http://localhost:5984/repos/_design/namelist/_view/findBoys?startkey=[400,
>> 50]&endkey=[1000, 100]
>> couchdb return me a result like:
>> {"total_rows":13,"offset":13,"rows":[]}
>> but there at least a boy whose height=600 & weight=69 !
>>
>> and, when I use couchdb-1.5.0, the view work all right, it can return
>> the exact data.
>>
>> is the "startkey & endkey" not supported by couchdb-1.0.4? or I use a
>> mistake syntax?
>>
>>
>>
>> Qaqabincs
>>
>
>
>
> --
> Andy Wenk
> Hamburg - Germany
> RockIt!
>
> http://www.couchdb-buch.de
> http://www.pg-praxisbuch.de
>
> GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588

Reply via email to