我想對包含多個單詞的字段(例如'Name1 Name2',有時候帶點和逗號)做一個簡單的方面請求,但我得到的是......elasticsearch在空間方面分裂
"terms" : [{
"term" : "Name1",
"count" : 15
},
{
"term" : "Name2",
"count" : 15
}]
所以我的字段值用空格分開,然後運行方面的請求......
查詢例如:
curl -XGET http://my_server:9200/idx_occurrence/Occurrence/_search?pretty=true -d '{
"query": {
"query_string": {
"fields": [
"dataset"
],
"query": "2",
"default_operator": "AND"
}
},
"facets": {
"test": {
"terms": {
"field": [
"speciesName"
],
"size": 50000
}
}
}
}'
查詢在這裏只是一個例子(我不想給我的真實網址)。 事實是,speciesName字段需要不被分析。我想知道這是否意味着我絕對必須重新創建索引結構(大量數據),或者有其他方法可以避免這種情況... – user1249791