I have the following sample document:
{
“_class”: “some.package.Class”,
“creationTime”: 1234567890,
“title”: “title of element”,
“tags”: [ “tag1”, “tag2”, “tag3” ]
}
I now want to query all elements which contain given 2 tags with:
SELECT * FROM bucket WHERE _class = “some.package.Class”
AND (EVERY t IN [“tag1”, “tag2”] SATISFIES t IN tags END) LIMIT 16
I tried to create an index for this query with:
CREATE INDEX some_idx_title ON bucket((distinct (array k for k in tags end)))
WHERE (_class = “some.package.Class”)
But on explaining the select query it does not show up.
How do I have to create the index for this query?