pandasticsearch
pandasticsearch copied to clipboard
Support for nested field names
Really great project! One thing I was curious about is supported nested field names. For example:
foo.bar foo.baz foo.zap
Our schema in Elasticsearch supports one-level nesting, and I was having hard time getting the following to work.
df.filter(df.foo.bar == 'jane').select('last_name', 'email','age').collect()
Any help or suggestions would be appreciated. If was searching directly against the ES REST API the filter looks like:
"query": { "filtered": { "query": { "query_string": { "query": "+foo.bar:jane", "analyze_wildcard": true, "lowercase_expanded_terms": false } }
I'm Sorry. The nested field is not on the roadmap currently. But It is a good idea if we could utilize the query_string of ES to implement such feature.
+1
+1 would help a lot
We might use script filter instead as a workaround.
Hi thanks for this cool library ! does this issue include nested queries as such :
{'query':{
'nested': {
'path': 'docs', 'query': {
'match': {
'docs.feature': 'search_term'
}
}
}
}
}
?