0
나는 다음과 같은 Elasticsearch 매핑이 있습니다Elasticsearch 중첩 된 쿼리 및 필터링
"show": {
"properties": {
"startsAt": {
"type": "date"
},
"venue": {
"type": "nested",
"properties": {
"name": {
"type": "string"
},
"address": {
"type": "string",
"index": "no"
},
"location": {
"type": "geo_point",
"lat_lon": true
},
"section": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
}
내가 show.startsAt
, show.venue.location
및 show.venue.section
속성을 사용하여 정확하게 일치를 찾으려합니다. 나는 다음과 같은 쿼리를 시도했지만, show.venue.section
을 고려하지 않았습니다.
bool: {
must: [
{match: {startsAt: starts}},
{
nested: {
path: 'venue',
query: {
match: {'venue.section': section}
},
filter: {
geo_distance: {
distance: '1m',
'venue.location': location
}
}
}
}
]
}