elasticsearch-dsl-py: dsl doesn't parser filter correctly
Hello, I have these code:
self.search = self.search.filter(
'geo_polygon', location={'points': polygon_coordinates}
)
and these result:
Exception Value: filter() got an unexpected keyword argument 'location'
I have these location
index, on _mappings
{
"myindex_data": {
"mappings": {
"my_data": {
"properties": {
"location": {
"type": "geo_point"
}
}
}
}
}
So, my issue is: there’s issue on DSL, work with geo_polygon or my command is incorrect?
Thanks!
Regards!
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (6 by maintainers)
FacetedSearch
has aSearch
object stored asself._s
. In your case you want to, however, override thesearch
method and add any logic in there:What you are doing is overriding a built-in
search
method with an instance ofSearch
which is not supported and cannot be picked up by the rest of theFacetedSearch
code.Hope this helps