Search code examples
iosparse-platformpfquery

parse.com containsAllObjectsInArray limit


I am running into a limit during a pfquery using containsAllObjectsInArray.

My objects in parse have an array attribute that can contain up to 12 strings, the query works great as long as my search query array is 9 or less strings.

When I do a PFQuery on this table using containsAllObjectsInArray and my search array contains anything more than 9 objects, I get the following error.

Error: Too many terms in $all query (Code: 154, Version: 1.2.19)

So obviously the containsAllObjectsInArray can only search 9 or less matches within an array.

Is this going to be fixed?

I was following Parse's example blog post on scalable searches using tags, http://blog.parse.com/2013/03/19/implementing-scalable-search-on-a-nosql-backend/. very surprised this is the method recommended and it bombs after object has more than 9 tags.


Solution

  • I should of tried this first before posting, but I simply split my search into sub arrays all with max size of 9 and then added them each to the pfquery in multiple containsAllObjectsInArray calls. Query worked fine. Kind of a hack work around, but works for now.