whereArrayContains limit to 10

前端 未结 1 405
不思量自难忘°
不思量自难忘° 2021-01-14 03:42

I want to filter questionCollection on basis of tagIDs . Everything working fine but whereArraycontains is working for max

相关标签:
1条回答
  • 2021-01-14 04:03

    The documentation for whereArrayContains queries is very specific. It can only work with 10 array items:

    use the array-contains-any operator to combine up to 10 array-contains clauses on the same field with a logical OR

    You should know that whereArrayContains does not reduce the number of billed document reads. If your array contains 10 items, it will still cost 10 document reads. If you perform 10 whereArrayContains queries, each with 10 array items, it will still cost 100 reads.

    If you need N documents, there is no shortcut to make those N document reads cost less than the cost of N document reads.

    0 讨论(0)
提交回复
热议问题