From b46f7e74e622f90cf4d9e398304d4b2fa9b7435a Mon Sep 17 00:00:00 2001 From: Jason Veatch Date: Thu, 1 Dec 2016 14:17:44 -0500 Subject: [PATCH] Querying with parent id has changed in ES v5 --- example/queries.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/example/queries.py b/example/queries.py index d487fcb8..3c12dc9f 100644 --- a/example/queries.py +++ b/example/queries.py @@ -60,13 +60,8 @@ result = es.search( doc_type='commits', body={ 'query': { - 'bool': { - 'must': { - 'term': { - # parent ref is stored as type#id - '_parent': 'repos#elasticsearch-py' - } - } + 'parent_id': { + 'type': 'commits', 'id': 'elasticsearch-py' } }, 'sort': [