Spatial views are proving to be tricky
Hi
For documents loaded from my GIS (here is a typical one):
{
"Last_Editor": "Brian",
"Creation_Date": "2012-12-15 12:22:57",
"ThoroughfareNumber": "45",
"Locality": "HALF MOON BAY",
"ThoroughfareTrailingType": "RD",
"Creator": "Tich",
"PostTown": "MANUKAU",
"ThoroughfareName": "PIGEON MOUNTAIN",
"AddressIdentifier": 214212,
"Shape": {
"type": "Point",
"coordinates": [
174.9000444190001,
-36.88651310299997
]
},
"Extent": {
"XMin": 174.9000444190001,
"YMin": -36.88651310299997,
"YMax": -36.88651310299997,
"XMax": 174.9000444190001
},
"PostalCode": "2012",
"LayerName": "DeliveryPoints",
"Last_Edit_Date": "2013-01-02 12:25:02"
}
...and a dev spatial view defined in Couchbase Console:
function (doc, meta) {
if (doc.Shape && doc.LayerName && doc.LayerName == 'DeliveryPoints') {
emit(doc.Shape, meta.id);
}
}
...I get no rows returned. Is there more to giving the system more hints on GeoJSON?
Thanks
Hello Bruce,
Yes eventual consistency is alway surprising during development... so if you really need to have the latest persisted data you can use the Stale parameter when you call your view.
I am inviting you to read this part of the documentation: "Index Updates and the stale Parameter"
http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-views-writi...
Regards
It came alive - so I think I'm OK - eventual consistency can be scary!