Adaptive index on duplicate field names

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?

Object can have single unique field second one overrides first one.

Use secondary index vs adaptive index