Details
-
Bug
-
Resolution: Fixed
-
Major
-
5.0.0
-
None
-
Untriaged
-
Unknown
Description
When projection is nil means project the all the index keys and meta().id
distinct= true means send distinct values of projection (i.e. when projection is nil the distinct needs to applied on all keys + meta().id).
Distinct is hint to index API2. When passed it can ignore and provide duplicates. But it can't wrongly eliminate values.
INSERT INTO default VALUES("k11",{"ka0":[5, 15], "k0":1}); |
INSERT INTO default VALUES("k12",{"ka0":[5, 25], "k0":1}); |
INSERT INTO default VALUES("k13",{"ka0":[4, 15], "k0":2}); |
INSERT INTO default VALUES("k14",{"ka0":[4, 15], "k0":2}); |
CREATE INDEX ix1 ON default (k0); |
SELECT DISTINCT meta().id, k0 FROM default WHERE k0 = 1; |
curl -H "Accept: application/json" -v Administrator:password@127.0.0.1:9102/api/index/17910814830959724252?multiscan=true -X GET -d '{"reverse": false, "projection": null, "distinct": true, "limit": 10000, "offset": 0, "stale": "false", "scans": "[{\"Filter\": [
{\"Low\": 1, \"High\": 1, \"Inclusion\": 3}]}]"}'