Hello,
I have this kind of document :
{
“loc”: [
45.3400745,
5.6058141
],
“var1”: “70”,
“var2”: “jjdjdjdjdj”
}
My spatial view:
function (doc,meta) {
if (doc.loc && doc.libelle && doc.enseigne && doc.categorie) {
emit(
{
type: “Point”,
coordinates: [doc.loc[0], doc.loc[1]],
},[doc.var1,doc.var2]);
}
}
Result:
{“total_rows”:0,“rows”:[
{“id”:“2014100413443481”,“key”:[[45.3400745,45.3400745],[5.6058141,5.6058141]],“value”:"[“70”,“jjdjdjdjdj”]",“geometry”:{“type”:“Point”,“coordinates”:[45.3400745,5.6058141]}}
]
}
In couchbase I don’t have any problem.
In 3.0 couchbase don’t return an array but a string.
How can I do ?
Best regards