나는 두 개의 서로 다른 필드의 조합 (위도 및 경도)탄성 검색 이중면
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
}
}
}
}'
그것은 ... 어떤 예상보다 결과의 두 배 수를 제공하여 어떤 그룹 데이터 탄성 검색 쿼리를 실행하려면 생각? 대답의 더 relevants 부품은
...
_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 이루어집니다 (아래 참조).
여러 레코드가 위도 (경도가 다름) 또는 viceversa를 공유 할 수 있으므로 위도 또는 경도 만 그룹화 할 수 없습니다.
당신은 당신이 얻을 출력을 표시 할 수 있습니다 : 여기에, 그것을 시도를 제공 도움이 예는? – CharlesB
나는 정말로 질문을 해결한다고 생각지 않는 대답을 받아 들일 수 없다 ... – user1249791