Skip to content

Commit 373da0d

Browse files
committed
query modules don't need to be given an index name anymore
1 parent d709a5e commit 373da0d

File tree

17 files changed

+18
-73
lines changed

17 files changed

+18
-73
lines changed

lib/MetaCPAN/API/Plugin/Model.pm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ has download => sub {
2121

2222
has search => sub {
2323
my $self = shift;
24-
return MetaCPAN::Query::Search->new(
25-
es => $self->app->es,
26-
index_name => 'cpan',
27-
);
24+
return MetaCPAN::Query::Search->new( es => $self->app->es, );
2825
};
2926

3027
has user => sub {

lib/MetaCPAN/Document/Author/Set.pm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ has query_author => (
1616

1717
sub _build_query_author {
1818
my $self = shift;
19-
return MetaCPAN::Query::Author->new(
20-
es => $self->es,
21-
index_name => $self->index->name,
22-
);
19+
return MetaCPAN::Query::Author->new( es => $self->es );
2320
}
2421

2522
__PACKAGE__->meta->make_immutable;

lib/MetaCPAN/Document/CVE/Set.pm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ has query_cve => (
2020

2121
sub _build_query_cve {
2222
my $self = shift;
23-
return MetaCPAN::Query::CVE->new(
24-
es => $self->es,
25-
index_name => 'cve',
26-
);
23+
return MetaCPAN::Query::CVE->new( es => $self->es );
2724
}
2825

2926
__PACKAGE__->meta->make_immutable;

lib/MetaCPAN/Document/Contributor/Set.pm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ has query_contributor => (
1616

1717
sub _build_query_contributor {
1818
my $self = shift;
19-
return MetaCPAN::Query::Contributor->new(
20-
es => $self->es,
21-
index_name => 'contributor',
22-
);
19+
return MetaCPAN::Query::Contributor->new( es => $self->es );
2320
}
2421

2522
__PACKAGE__->meta->make_immutable;

lib/MetaCPAN/Document/Cover/Set.pm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ has query_cover => (
1616

1717
sub _build_query_cover {
1818
my $self = shift;
19-
return MetaCPAN::Query::Cover->new(
20-
es => $self->es,
21-
index_name => 'cover',
22-
);
19+
return MetaCPAN::Query::Cover->new( es => $self->es );
2320
}
2421

2522
__PACKAGE__->meta->make_immutable;

lib/MetaCPAN/Document/Distribution/Set.pm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ has query_distribution => (
1616

1717
sub _build_query_distribution {
1818
my $self = shift;
19-
return MetaCPAN::Query::Distribution->new(
20-
es => $self->es,
21-
index_name => 'cpan',
22-
);
19+
return MetaCPAN::Query::Distribution->new( es => $self->es );
2320
}
2421

2522
__PACKAGE__->meta->make_immutable;

lib/MetaCPAN/Document/Favorite/Set.pm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ has query_favorite => (
2020

2121
sub _build_query_favorite {
2222
my $self = shift;
23-
return MetaCPAN::Query::Favorite->new(
24-
es => $self->es,
25-
index_name => $self->index->name,
26-
);
23+
return MetaCPAN::Query::Favorite->new( es => $self->es );
2724
}
2825

2926
__PACKAGE__->meta->make_immutable;

lib/MetaCPAN/Document/File/Set.pm

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ has query_file => (
2525

2626
sub _build_query_file {
2727
my $self = shift;
28-
return MetaCPAN::Query::File->new(
29-
es => $self->es,
30-
index_name => $self->index->name,
31-
);
28+
return MetaCPAN::Query::File->new( es => $self->es );
3229
}
3330

3431
has query_favorite => (
@@ -41,10 +38,7 @@ has query_favorite => (
4138

4239
sub _build_query_favorite {
4340
my $self = shift;
44-
return MetaCPAN::Query::Favorite->new(
45-
es => $self->es,
46-
index_name => $self->index->name,
47-
);
41+
return MetaCPAN::Query::Favorite->new( es => $self->es );
4842
}
4943

5044
has query_release => (
@@ -57,10 +51,7 @@ has query_release => (
5751

5852
sub _build_query_release {
5953
my $self = shift;
60-
return MetaCPAN::Query::Release->new(
61-
es => $self->es,
62-
index_name => $self->index->name,
63-
);
54+
return MetaCPAN::Query::Release->new( es => $self->es );
6455
}
6556

6657
my @ROGUE_DISTRIBUTIONS = qw(

lib/MetaCPAN/Document/Mirror/Set.pm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ has query_mirror => (
1616

1717
sub _build_query_mirror {
1818
my $self = shift;
19-
return MetaCPAN::Query::Mirror->new(
20-
es => $self->es,
21-
index_name => $self->index->name,
22-
);
19+
return MetaCPAN::Query::Mirror->new( es => $self->es );
2320
}
2421

2522
__PACKAGE__->meta->make_immutable;

lib/MetaCPAN/Document/Package/Set.pm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ has query_package => (
1616

1717
sub _build_query_package {
1818
my $self = shift;
19-
return MetaCPAN::Query::Package->new(
20-
es => $self->es,
21-
index_name => $self->index->name,
22-
);
19+
return MetaCPAN::Query::Package->new( es => $self->es );
2320
}
2421

2522
__PACKAGE__->meta->make_immutable;

0 commit comments

Comments
 (0)