I am trying to filter data with multiple where()
methods using the array-contains
operator, however I am having the following error:
One solution would be to store the 'tags' in an Object as its property names.
node_sku = {
"sku1": true,
"sku2": true,
...
"skun": true
}
Then you can create the AND WHERE clauses like this:
list.forEach( (val) => {
ref = ref.where(`node_sku.${val}` , '==' , true);
});
This approach is an answer to the question "without having to query them individually". However, as soon as you want ordering and pagination, you will run into another invisible brick wall of compound indices.