how to query mulitiple composite key?

Hi,
question is whether we can give many composite keys in startkey and end key

example my data in bucket:
{
{
name:"Sruthi",
gender:"F",
age:"23"
}
{
name:"raghun",
gender:"M",
age:"24"
}
{
name:"david",
gender:"M",
age:"56"
}
{
name:"jeff",
gender:"M",
age:"65"
}
{
name:"raghun",
gender:"F",
age:"23"
}
}

my view is
emit([doc.name,doc.gender,doc.age],null)

i want to query data for the name "Sruthi" and "rraghun" and gender "F" and age some range and sort it based on age

startkey=[["Sruthi","F"],["rraghun","F"]]&endkey=[["Sruthi","F",{}],["rraghun","F",{}]]

i know it is working for single composite key but how to query for multiple composite keys.

Thanks

1 Answer

« Back to question.

Hello,

Using the Couchbase 2.x server and views, it is only possible to query from left to right, so you can not deal with multiple criteria and range in the same query.

Regards
Tug
@tgrall