How to filter (Azure) Collection of Edm.String by count or equility?

Viewed 94

I have models in the index (Azure), like:

[
  { list: ['1', '2', '3'] },
  { list: ['1', '3'] },
  { list: ['5', '5', '5'] },
  { list: ['1'] }
]

I need to find data where this property (list) has only one exact item '1' using queries (filter), how to make it?

My variants were to use queries:

  1. Use $filter=list/any(item: item eq '1') and list/$count eq 1, but it seems like there is no such a thing, as count of the items in the collection.
  2. Use $filter=list/all(item: item eq '1') just to be sure all items are the same (for me it's a tradeoff and I can use it), but eq is not allowed inside all.
  3. Use wildcard patterns $filter=list/all(item: not search.ismatch('<inversed ignore pattern>', item, 'full', 'all')), but search.ismatch is not supported inside lambda expressions

How to make it?

0 Answers
Related