I have a problem with ARRAY INDEXES

Try the following options.
CREATE INDEX test4co2
ON default(status,options, DISTINCT ARRAY equip FOR equip IN equipments end,equipments,colors) WHERE documentType = “CARX”;

SELECT DISTINCT(color.id) FROM (SELECT colors FROM default USE INDEX (test4co2) WHERE documentType = “CARX” AND AND status = ‘Open’ AND options IN [‘x1’,‘b21’] AND ANY equip IN equipments SATISFIES equip IN [“xx1”,“xx2”, “xx3”, “xx4”, “xx5”, “xx6”, “xx7”,…etc] END) as d UNNEST d.colors as color;

OR

CREATE INDEX test4co2
ON default(status,options, equipments,colors) WHERE documentType = “CARX”;

SELECT DISTINCT(color.id) FROM (SELECT colors FROM default USE INDEX (test4co2) WHERE documentType = “CARX” AND AND status = ‘Open’ AND options IN [‘x1’,‘b21’] AND equipments IN [“xx1”,“xx2”, “xx3”, “xx4”, “xx5”, “xx6”, “xx7”,…etc] ) as d UNNEST d.colors as color;

Also you can remove status from index key and move to WHERE clause of index.

For each option that is not in the WHERE clause, use IS NOT MISSING for that option. This will allow it to use the same index.

WHERE option1 IS NOT MISSING AND option2 = 5 ...

Hi @geraldss , @vsr1 , I have a question about to indexer process, I must down the couchbase version to 4.1.1 and set the ram to index quote with 256 MB, then this process reaches up 10 GB and 100% CPU, WHY ? is a BUG? Any solution?

Regards!

Hi @prasad and @deepkaran.salooja, can you help with this indexing question.

@rodrigo.rio, can you share your indexer.log when you see 10G of memory usage.