Index on strings Array



Index: create index MultiCity on STRESS (distinct array n for n in Cities end) where Entity = ‘State’;

Above index works on query: Select * from STRESS E WHERE E.Entity = ‘State’ and (any F in Cities satisfies F = ‘New York’ end);

But not on Select * from STRESS E WHERE E.Entity = ‘State’ and ‘New York’ in Cities;

Can you please suggest the index for second query? Hope there is no issue in using second query instead of first.


Array Index can be used with ANY clause.
Second query will not be optimal. ‘New York’ in Cities can’t be pushed to indexer that mean it need push only entity to indexer and fetch all data apply post filter.

If Still want
create index ix1 on STRESS (Entity);