1
理想情況下,我需要計算在城市名稱中使用「倫敦」的次數。但查詢返回「倫敦」,「倫敦」和「LoNdOn」等不同的值。 我已經嘗試使用不區分大小寫作爲選項,但它不會給我所需的結果。德魯伊查詢不返回大小寫聚合不敏感結果
這裏是我的查詢,
{
"queryType": "topN",
"dataSource": "wikiticker",
"dimension":"cityName",
"granularity": "ALL",
"metric": "count",
"threshold": 10,
"filter":
{
"type": "search",
"dimension": "cityName",
"query": {
"type": "insensitive_contains",
"value": "london",
}
},
"aggregations": [
{
"type": "longSum",
"name": "count",
"fieldName": "count"
}
],
"intervals": ["2014-10-01T00:00:00.000Z/2016-10-07T00:00:00.000Z"]
}
這是我的結果:
[ {
"timestamp" : "2015-09-12T00:46:58.771Z",
"result" : [ {
"count" : 21,
"cityName" : "London"
},
{
"count" : 10,
"cityName" : "New London"
},
{
"count" : 3,
"cityName" : "london"
},
{
"count" : 1,
"cityName" : "LoNdon"
},
{
"count" : 1,
"cityName" : "LondOn"
} ]
} ]
我應該得到的東西,如:
[ {
"timestamp" : "2015-09-12T00:46:58.771Z",
"result" : [ {
"count" : 26,
"cityName" : "London"
},
{
"count" : 10,
"cityName" : "New London"
} ]
} ]
所以現在insensitive_contains越來越我,我需要不論搜索關鍵詞中提供的情況下的值,但是我現在有將所有具有相似詞語但不同情況的值統計在一起,而不是單獨計算 – Anonymous