Querying with parent id has changed in ES v5
This commit is contained in:
committed by
Jason Veatch
parent
3401b21f1c
commit
b46f7e74e6
+2
-7
@@ -60,13 +60,8 @@ result = es.search(
|
|||||||
doc_type='commits',
|
doc_type='commits',
|
||||||
body={
|
body={
|
||||||
'query': {
|
'query': {
|
||||||
'bool': {
|
'parent_id': {
|
||||||
'must': {
|
'type': 'commits', 'id': 'elasticsearch-py'
|
||||||
'term': {
|
|
||||||
# parent ref is stored as type#id
|
|
||||||
'_parent': 'repos#elasticsearch-py'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'sort': [
|
'sort': [
|
||||||
|
|||||||
Reference in New Issue
Block a user