File tree Expand file tree Collapse file tree 1 file changed +11
-21
lines changed Expand file tree Collapse file tree 1 file changed +11
-21
lines changed Original file line number Diff line number Diff line change @@ -41,14 +41,12 @@ def print_hits(results):
4141 doc_type = 'commits' ,
4242 body = {
4343 'query' : {
44- 'filtered ' : {
45- 'query ' : {
44+ 'bool ' : {
45+ 'must ' : {
4646 'match' : {'description' : 'fix' }
4747 },
48- 'filter' : {
49- 'not' : {
50- 'term' : {'files' : 'test_elasticsearch' }
51- }
48+ 'must_not' : {
49+ 'term' : {'files' : 'test_elasticsearch' }
5250 }
5351 }
5452 }
@@ -62,8 +60,8 @@ def print_hits(results):
6260 doc_type = 'commits' ,
6361 body = {
6462 'query' : {
65- 'filtered ' : {
66- 'filter ' : {
63+ 'bool ' : {
64+ 'must ' : {
6765 'term' : {
6866 # parent ref is stored as type#id
6967 '_parent' : 'repos#elasticsearch-py'
@@ -86,19 +84,11 @@ def print_hits(results):
8684 body = {
8785 'size' : 0 ,
8886 'query' : {
89- 'filtered' : {
90- 'filter' : {
91- 'has_parent' : {
92- 'type' : 'repos' ,
93- 'query' : {
94- 'filtered' : {
95- 'filter' : {
96- 'term' : {
97- 'tags' : 'python'
98- }
99- }
100- }
101- }
87+ 'has_parent' : {
88+ 'parent_type' : 'repos' ,
89+ 'query' : {
90+ 'term' : {
91+ 'tags' : 'python'
10292 }
10393 }
10494 }
You can’t perform that action at this time.
0 commit comments