Created
October 15, 2014 04:21
-
-
Save kentfredric/65295334188a7fba4024 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/MetaCPAN/Client/Request.pm b/lib/MetaCPAN/Client/Request.pm | |
index ddd733a..6ab91de 100644 | |
--- a/lib/MetaCPAN/Client/Request.pm | |
+++ b/lib/MetaCPAN/Client/Request.pm | |
@@ -81,23 +81,28 @@ sub ssearch { | |
my $type = shift; | |
my $args = shift; | |
my $params = shift; | |
+ return $self->_ssearch_raw({ | |
+ type => $type, | |
+ body => $self->_build_body($args), | |
+ %{ $params }, | |
+ }); | |
+} | |
+sub _ssearch_raw { | |
+ my ( $self, $config ) = @_; | |
my $es = Search::Elasticsearch->new( | |
nodes => $self->domain, | |
cxn_pool => 'Static::NoPing', | |
send_get_body_as => 'POST', | |
( $self->_has_user_ua ? ( handle => $self->_user_ua ) : () ) | |
); | |
- | |
my $scroller = Search::Elasticsearch::Scroll->new( | |
es => $es, | |
search_type => 'scan', | |
scroll => '5m', | |
index => $self->version, | |
- type => $type, | |
size => 1000, | |
- body => $self->_build_body($args), | |
- %{ $params }, | |
+ %{ $config } | |
); | |
return $scroller; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment