Veri Kovanın içindeki verilerin aşağıdaki diziyi benim Couchbase Server içinde SİTELERİ sahipN1QL sorgu Couchbase Server JSON dizi filtre
"siteMaster": [
{
"sitename": "HTS_SITE_001",
"sitelink": "http://facebook.com",
"address" : "19/2, Bellandur, Bangalore India",
"filename": "site1.json",
"persons": 1,
"status": "70%",
"contact": "[email protected]",
}, {
"sitename": "HTS_SITE_002",
"sitelink": "http://facebook.com",
"address": "5th Avenue, New York",
"filename": "site2.json",
"persons": 1,
"status": "70%",
"contact": "[email protected]",
}, {
"sitename": "HTS_SITE_003",
"sitelink": "http://facebook.com",
"address": "Palo Alto, California",
"filename": "site3.json",
"persons": 1,
"status": "80%",
"contact": "[email protected]",
}, {
"sitename": "HTS_SITE_004",
"sitelink": "http://facebook.com",
"address": "Bellandur, Bangalore",
"filename": "site4.json",
"persons": 1,
"status": "80%",
"contact": "[email protected]",
}
]
SİTELERDEKİ yerden seçme
* için N1QL sorgu status = "70%" iki satır döndürmeli, ancak ne yazık ki herhangi bir satır döndürmüyor.
Sorguda nereye yanlış gidiyorum?
CREATE INDEX idx ON SITES(DISTINCT ARRAY sm.status FOR sm IN siteMaster END);
Couchbase 4.1 veya 4.5 DP yükseltin: Ayrıca sorgu hızlandırmak için aşağıdaki dizi dizin oluşturabilirsiniz
: – geraldss
@geraldss Bu, 4.5 –