We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 936be4c commit 7c53b66Copy full SHA for 7c53b66
lib/MetaCPAN/Model.pm
@@ -28,7 +28,8 @@ for my $index ( sort keys %indexes ) {
28
sub doc {
29
my ( $self, $doc ) = @_;
30
my $doc_config = es_config->documents->{$doc};
31
- return $self->index( $doc_config->{index} )->type( $doc_config->{type} );
+ return $self->index( $doc_config->{index} )
32
+ ->type( $doc_config->{type} // $doc_config->{index} );
33
}
34
35
__PACKAGE__->meta->make_immutable;
0 commit comments