i am using cb version 4.0. spatial view query is returning zero rows from rest and no response when queried from gui. There is no error in view definition. query was fine earlier.
currently 20 lack documents exists in single node cluster,just wanted to know, what is causing issue.
could you share your view definition and a few sample docs?
This is my view definition
function (doc, meta)
{ var sync = doc._sync;
if ((sync === undefined) || (meta.id.substring(0,6) == “_sync:”))
return;
if ((sync.flags & 1) || (sync.deleted))
return;
if ((doc.type == “selfLocation”) && (doc.selfLocation) && (doc.selfLocation.type == “Feature”) && (doc.selfLocation.geometry) && (doc.selfLocation.id))
{
emit([doc.selfLocation.geometry], {“id”:doc.selfLocation.id,“tm”:doc.serverTime,“rev”:sync.rev})
}
}
and sample doc is
{
"_sync": {
“rev”: “5961-ee9430b38ba12e15b3e43cdd3c6093bb”,
“sequence”: 55672286,
“recent_sequences”: [
54738274,
55653855,
55663613,
55672286
],
“history”: {
“revs”: [
“5957-f66619c20e39552b0e070b7f67100127”,
“5960-b07c6c4086026ff0d6762d2299cf4834”,
“5961-ee9430b38ba12e15b3e43cdd3c6093bb”,
“5959-2efcf9c3e82cd1e439ebdbd39db9587a”,
“5958-991c2e6dadfcd5518979df270a82695c”
],
“parents”: [
-1,
3,
1,
4,
0
],
“channels”: [
[
“LocationServer”
],
[
“LocationServer”
],
[
“LocationServer”
],
[
“LocationServer”
],
[
“LocationServer”
]
]
},
“channels”: {
“LocationServer”: null,
“co326_cg92_loc-CH”: {
“seq”: 38627947,
“rev”: “3725-3173206b90359c965d9a78c3c74113d0”
},
“s919591211822_location-CH”: {
“seq”: 54855250,
“rev”: “5873-9ccf9295716fb4eeb9ddb10046f42c6d”
}
},
“time_saved”: “2016-05-31T19:45:03.175353607+05:30”
},
“clientType”: “CBCLIENT”,
“selfLocation”: {
“geometry”: {
“coordinates”: [
“77.594563”,
“12.971599”
],
“type”: “Point”
},
“id”: “919591211822”,
“properties”: {
“accuracy”: “10”,
“clientReportTime”: “1437975400”,
“locDescp”: “CityPoint”
},
“type”: “Feature”
},
“state”: “pending”,
“type”: “selfLocation”,
“ver”: “1.0”
}
thanks. I am using 4.5 beta build and I can see the output on my end with this view query with the sample doc and view definition you sent.
Could you tell me which version are you on?
thanks
i am using couchbase 4.0.0 version. Even i do get the results when document count is less. But no results when i have more documents. currently i have 2 million documents.