login ='jh...@gmail.com';
time = new Date().getTime();
lowerBound = [login,0,'file-transfer'];
upperBound = [login,time,'file-transfer'];
transcriptIndex = "[login+dateInMilliseconds+label]";
db.chatTranscripts.where(transcriptIndex).between(lowerBound,upperBound).reverse().toArray(function(data){
console.log(data);
}).catch(function(error){
console.error(error);
});
But the query is giving all objects with the current index. Basically i was trying to implement filters. Please help me with this and let me know if any further information needed.
Unfortunately, startsWith () and startsWithIgnoreCase () cannot be used with arrays / compound keys but requires a string as its single argument.
You could use the between () operator but then it would only be able to compare case sensitively. (Similar to earlier question in this thread.)
"[login+label+dateInMilliseconds]"
Instead of :
"[login+dateInMilliseconds+label]"
And then query accordingly. Otherwise ask labels for that login may be returned