Creating Array index on inner join

Hello everyone.

I´m new using N1QL.

I have this query, that Works fine:
select b
from DevBrowsing1 b
inner join DevBrowsing1 a on keys b.menuAppIds
where b.WCSCode = 466006
and b.isVisible = true
and any store in a.stores satisfies store.WCSCode = 10701 end;

But I would like to know how could I improve the performance of this query with indexes or anything else.
Info: all documents are in same bucket and menuAppIds is an array of strings.
I´m not able to create a propper index to use it on the inner join
Thanks and regards.

CREATE INDEX ix1 ON DevBrowsing1 (WCSCode) WHERE isVisible = true;
OR
If you use similar query with isVisable = false
CREATE INDEX ix1 ON DevBrowsing1 (isVisable, WCSCode);

In this case you will not able to use array index because it is right side of JOIN.
Is menuAppIds is ARRAY or just field?

Hi vsr1,

Thanks for the answer, the query is going faster now.
I understand that is not posible to improve it more with indexes, probably changing the query?
menuAppIds is a field that is an Array of strings.

Thanks alot for and regards.

The index i provided earlier is optimized. Try pretty=false on 4.5.1 and above.