Skip to content

Commit 0a8d44a

Browse files
committed
fix some not queries to use bool.must_not
1 parent 3c97290 commit 0a8d44a

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

lib/MetaCPAN/Query/Release.pm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,9 @@ sub find_download_url {
10441044
my $module_filter = $type eq 'module';
10451045

10461046
if ( !$explicit_version ) {
1047-
push @filters, { not => { term => { status => 'backpan' } } };
1047+
push @filters,
1048+
{ bool => { must_not => [ { term => { status => 'backpan' } } ] }
1049+
};
10481050
if ( !$dev ) {
10491051
push @filters, { term => { maturity => 'released' } };
10501052
}

lib/MetaCPAN/Script/Backpan.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ sub _get_release_query {
9494
unless ( $self->undo ) {
9595
return +{
9696
query => {
97-
not => { term => { status => 'backpan' } }
97+
bool =>
98+
{ must_not => [ { term => { status => 'backpan' } } ] }
9899
}
99100
};
100101
}

lib/MetaCPAN/Script/Checksum.pm

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,16 @@ sub run {
5050
scroll => '10m',
5151
body => {
5252
query => {
53-
not => {
54-
exists => {
55-
field => "checksum_md5"
56-
}
57-
}
58-
}
53+
bool => {
54+
must_not => [
55+
{
56+
exists => {
57+
field => "checksum_md5"
58+
}
59+
},
60+
],
61+
},
62+
},
5963
},
6064
fields => [qw( id name download_url )],
6165
);

lib/MetaCPAN/Script/Tickets.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ sub check_all_distributions {
8484
fields => ['distribution'],
8585
body => {
8686
query => {
87-
not => { term => { status => 'backpan' } }
87+
bool =>
88+
{ must_not => [ { term => { status => 'backpan' } } ] }
8889
}
8990
},
9091
);

0 commit comments

Comments
 (0)