Views not returning documents
Tue, 06/26/2012 - 04:19
Hi all,
I've just discovered that some of my views are not returning all documents that they are supposed to return. For instance,
I have this document:
{
"_id": "stock-babau-droneremix",
"_rev": "3-0001236666a163e50000003b00000000",
"$flags": 0,
"$expiration": 0,
"jsonType": "stock",
"stock": 3,
"product": "babau-droneremix"
}That is not returned by this view (_design/dev_stock/_view/stock) :
function (doc) {
if(doc.jsonType == "stock") {
emit(doc.product,doc.stock);
}
}Even if I go for the all cluster data set by accessing server.com:8092/default/_design/dev_stock/_view/stock?full_set=true&connection_timeout=60000
I don't get that document in the results.
Any ideas?
EDIT: I'm running Version: 2.0.0 community edition (build-722-rel) on an Ubuntu x86_64-unknown-linux-gnu
I don't immediately see a reason why you wouldn't get it back. Does the log show any errors? Also, did you request multiple times or do stale=false?
There is an open bug where the UI was not showing errors. You may want to try with some other HTTP client (like curl) and see if there is an errors section at the end of the JSON response.
Do you think this can be duplicated with the doc and view described above?