Navigation Menu

Skip to content

Commit

Permalink
Tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
oalders committed Apr 21, 2016
1 parent 57dc4f2 commit a451b95
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion lib/MetaCPAN/Document/Favorite.pm
Expand Up @@ -41,7 +41,7 @@ Sets the C<_timestamp> field to the value of L</date>.

has timestamp => (
is => 'ro',
timestamp => {}, # { path => 'date', store => 1 },
timestamp => {}, # { path => 'date', store => 1 },
);

__PACKAGE__->meta->make_immutable;
2 changes: 1 addition & 1 deletion lib/MetaCPAN/Model/User/Session.pm
Expand Up @@ -14,7 +14,7 @@ Sets the C<_timestamp> field.

has timestamp => (
is => 'ro',
timestamp => {}, # { store => 1 },
timestamp => {}, # { store => 1 },
);

__PACKAGE__->meta->make_immutable;
Expand Down
2 changes: 1 addition & 1 deletion lib/MetaCPAN/Script/Backpan.pm
Expand Up @@ -46,7 +46,7 @@ sub update_status {
type => 'release',
fields => [ 'author', 'name' ],
body => {
query => {
query => {
filtered => {
query => { match_all => {} },
filter => {
Expand Down
8 changes: 2 additions & 6 deletions lib/MetaCPAN/Script/Latest.pm
Expand Up @@ -87,12 +87,8 @@ sub run {
}
)->source(
[
'module.name',
'author',
'release',
'distribution',
'date',
'status',
'module.name', 'author', 'release', 'distribution',
'date', 'status',
]
)->size(100)->raw->scroll;

Expand Down
11 changes: 6 additions & 5 deletions lib/MetaCPAN/Script/Pagerank.pm
Expand Up @@ -28,8 +28,9 @@ sub run {
filter => {
and => [
{
term =>
{ 'release.dependency.phase' => 'runtime' }
term => {
'release.dependency.phase' => 'runtime'
}
},
{ term => { status => 'latest' } },
]
Expand Down Expand Up @@ -70,14 +71,14 @@ sub get_recent_modules {
my $scroll = $self->es->scroll_helper(
index => $self->index->name,
type => 'file',
body => {
body => {
query => {
filtered => {
query => { match_all => {} },
filter => {
and => [
{ term => { 'file.status' => 'latest' } },
{ term => { 'file.module.indexed' => \1 } },
{ term => { 'file.status' => 'latest' } },
{ term => { 'file.module.indexed' => \1 } },
{ term => { 'file.module.authorized' => \1 } },
]
}
Expand Down
3 changes: 2 additions & 1 deletion lib/MetaCPAN/Script/Session.pm
Expand Up @@ -16,7 +16,8 @@ sub run {
scroll => '1m',
index => 'user',
type => 'session',
body => { query => { filtered => { query => { match_all => {} }, }, }, },
body =>
{ query => { filtered => { query => { match_all => {} }, }, }, },
);

my @delete;
Expand Down
1 change: 1 addition & 0 deletions lib/MetaCPAN/Server/QuerySanitizer.pm
Expand Up @@ -51,6 +51,7 @@ sub _scan_hash_tree {
_scan_hash_tree($item) if ref($item);
}
}

# Mickey: what about $ref eq 'JSON::PP::Boolean' ?
}

Expand Down

0 comments on commit a451b95

Please sign in to comment.