|
42 | 42 | fields => [ |
43 | 43 | qw< name release author distribution version authorized indexed maturity date > |
44 | 44 | ], |
45 | | - query => { match_all => {} }, |
46 | | - filter => { |
47 | | - and => [ |
48 | | - { term => { 'module.name' => $pkg } }, |
49 | | - { term => { authorized => 'true' } }, |
50 | | - { term => { maturity => 'released' } }, |
51 | | - ], |
| 45 | + query => { |
| 46 | + bool => { |
| 47 | + must => [ |
| 48 | + { term => { 'module.name' => $pkg } }, |
| 49 | + { term => { authorized => 'true' } }, |
| 50 | + { term => { maturity => 'released' } }, |
| 51 | + ], |
| 52 | + }, |
52 | 53 | }, |
53 | 54 | ); |
54 | 55 | my @files = @{ $results->{hits}{hits} }; |
|
58 | 59 | my $release_results = $es_release->search( |
59 | 60 | size => 1, |
60 | 61 | fields => [qw< name status authorized version id date >], |
61 | | - query => { match_all => {} }, |
62 | | - filter => { |
63 | | - and => [ |
64 | | - { term => { name => $file->{fields}{release} } }, |
65 | | - { term => { status => 'latest' } }, |
66 | | - ], |
| 62 | + query => { |
| 63 | + bool => { |
| 64 | + must => [ |
| 65 | + { term => { name => $file->{fields}{release} } }, |
| 66 | + { term => { status => 'latest' } }, |
| 67 | + ], |
| 68 | + }, |
67 | 69 | }, |
68 | 70 | ); |
69 | 71 |
|
|
79 | 81 | size => 1, |
80 | 82 | fields => |
81 | 83 | [qw< name status authorized version id date >], |
82 | | - query => { match_all => {} }, |
83 | | - filter => { |
84 | | - and => [ { |
85 | | - term => { name => $file->{fields}{release} } |
86 | | - } ] |
| 84 | + query => { |
| 85 | + bool => { |
| 86 | + must => [ |
| 87 | + { term => { name => $file->{fields}{release} } }, |
| 88 | + ], |
| 89 | + }, |
87 | 90 | }, |
88 | 91 | ); |
89 | 92 |
|
|
0 commit comments