Hi!
I have a following document structure:
{
"destination": { "city": "Allentown" },
"origin": { "city": "New York" }
}
Trying to create an adaptive index:
CREATE INDEX ai_markets ON bucket
(DISTINCT PAIRS({destination.city, origin.city, type}))
WHERE type = "market";
Instead, what couchbase creates looks like this:
CREATE INDEX `ai_markets` ON `bucket`
((distinct (pairs({"city": (`origin`.`city`), "type": `type`}))))
WHERE (`type` = "market")
So I only get to use this index with origin.city and not with destination.city.
It looks like the matching field names are causing the problem here. Is there any way around this?