Description
N1QL index selection has required matching variable names between array index definition and query predicate. Remove this restriction.
Previously required:
|
CREATE INDEX array_idx ON `beer-sample`( DISTINCT ARRAY t FOR t IN TOKENS( description ) END ); |
|
EXPLAIN
|
SELECT * |
FROM `beer-sample` |
WHERE ANY t IN TOKENS( description ) SATISFIES t = 'cognac' END; |
|
The variable t was required to be the same in both places.
With the restriction removed, the user is only concerned with the logical definition of the index, not the variable names used. This query will also match the above index.
|
EXPLAIN
|
SELECT * |
FROM `beer-sample` |
WHERE ANY foobar IN TOKENS( description ) SATISFIES foobar = 'cognac' END; |
|
Attachments
Issue Links
- blocks
-
MB-22188 4.6.2 Minor Release
- Closed