I follow sample provided to create Adaptive Index:
CREATE INDEX ai_airport_day_faa
ON travel-sample
(DISTINCT PAIRS({airportname, city, faa}))
WHERE type = “airport”;
but when perform:
EXPLAIN SELECT * FROM travel-sample
USE INDEX (ai_airport_day_faa)
WHERE faa = “SFO” AND (type
= “airport”);
it didn’t use “ai_airport_day_faa” index, the explain showed:
“#operator”: “IntersectScan”,
“scans”: [
{
“#operator”: “IndexScan2”,
“index”: “def_faa”,
“index_id”: “6475fcaf5cd79c1b”,
But if I use ai_self index, explain can show:
"#operator": "IntersectScan",
"scans": [
{
"#operator": "DistinctScan",
"scan": {
"#operator": "IndexScan2",
"index": "ai_self",
"index_id": "dbeefd762f81a8fe",
I’m using Couhbase 5.0. Kindly help, thank you