I have the documents with that look sort of like this
Sofa{
colour: red
purcaseDate: 12/8/2015
}
im trying to create a view that can help me find Sofa that are certain colours and have been purchased between certain days
in sudo sql
select Sofa where colour in ['red', 'blue'] and purchase date between day1 , day2
but im having difficulty creating the equivalent in couchDB or ektorp
i can create view
[red, purchaseDate] = doc
but when quering it
i can either do
ComplexKey start = ComplexKey.of(query.getStartKey());
ComplexKey end = ComplexKey.of(query.getEndKey());
view2.startKey(start).endKey(end);
OR
for(Object[] sample:query.getKeyValues()){
keys.add(ComplexKey.of(sample));
}
view2.keys(keys);
How can i do both?