我想運行一個彈性的搜索查詢該組數據由兩個不同字段的組合(經度和緯度)彈性搜索雙方面
curl -XGET http://www.my_server:9200/idx_occurrence/Occurrence/_search?pretty=true -d '{
"query": {
"query_string" : {
"fields" : ["genus_interpreted","dataset"],
"query": "Pica 2",
"default_operator" : "AND"
}
},
"facets": {
"test": {
"terms": {
"fields" :["decimalLatitude","decimalLongitude"],
"size" : 500000000
}
}
}
}'
它提供了比預期......任何結果的雙號理念?
答案的更多相關者部分是...
_shards":{
"total":5,
"successful":5,
"failed":0
},
"hits":{
"total":**37**,
"max_score":3.9314494,
"hits":[{
的總點擊數,37是如果我不應用方面的查詢結果。這個總數是面總數的一半(見下文)
"facets":{
"test":{
"_type":"terms",
"missing":0,
"total":**74**,
"other":0,
"terms":[
{"term":"167.21665954589844","count":5},
{"term":"167.25","count":4},
{"term":"167.14999389648438","count":4},
{"term":"167.1041717529297","count":4},
{"term":"-21.04166603088379","count":4},.....
所以,小分組(經度緯度,然後)separetely完成。
請注意,由於多個記錄可以共享緯度(但具有不同的經度)或反之亦然,因此我不能按經度或緯度組合。
可以顯示輸出你? – CharlesB
我不能接受我認爲不能真正解決問題的答案... – user1249791