Couchbase bucket and indexes

Secondary indexes only apply when there are filters (Ref: https://docs.couchbase.com/server/current/guides/select-index.html). In this case if you:

CREATE INDEX ix_type ON DataExchange(type)

and add a filter:

SELECT DISTINCT type FROM DataExchange WHERE type IS VALUED

it should then be supported by the index.

HTH.

1 Like