nickva commented on issue #3750:
URL: https://github.com/apache/couchdb/issues/3750#issuecomment-920978333


   @kocolosk, you're right, removing the line the rows are returned in the same 
order:
   
   ```
   while (true); do curl -su adm:pass 
'http://localhost:15984/debug/_design/test/_view/test?startkey="foo"&limit=6' ; 
sleep 1 ; done
   ```
   
   ```
   ...
   {"total_rows":12,"offset":8,"rows":[
   {"id":"doc1","key":"foo","value":null},
   {"id":"doc1","key":"foo","value":"fooValue"},
   {"id":"doc2","key":"foo","value":null},
   {"id":"doc2","key":"foo","value":"fooValue"}
   ]}
   ...
   ```
   
   I guess the general constraint is that the collation function must be 
identical to the one used on the shards themselves and if it isn't the 
`lists:merge/3` function won't work as expected?
   
   ```
   merge(Fun, List1, List2) -> List3
   
   Returns the sorted list formed by merging List1 and List2. Both List1
   and List2 must be sorted according to the ordering function Fun
   before evaluating this function. Fun(A, B) is to return true if A
   compares less than or equal to B in the ordering, otherwise false.
   When two elements compare equal, the element from List1 is picked
   before the element from List2.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to