$hashprimary_index = $es->scroll_helper( index => $primary_index, search_type => 'scan' ); while ($result_pi = $hashprimary_index->next) { #getting error on this line #do something } #### [Missing] ** [http://localhost:9200]-[404] Not Found, called from sub Search::Elasticsearch::Scroll::next at script/merge_v1.2.pl line 392. With vars: {'request' => {'serialize' => 'std','ignore' => [],'method' => 'GET','body' => 'c2Nhbjs1OzM2OTE6d1lvWW9YTHZRbVNzZjR3RkdtR3FPZzszNjkyOndZb1lvWEx2UW1Tc2Y0d0ZHbUdxT2c7MzY5Mzp3WW9Zb1hMdlFtU3NmNHdGR21HcU9nOzM2OTU6d1lvWW9YTHZRbVNzZjR3RkdtR3FPZzszNjk0OndZb1lvWEx2UW1Tc2Y0d0ZHbUdxT2c7MTt0b3RhbF9oaXRzOjI2MDs=','qs' => {'scroll' => '1m'},'path' => '/_search/scroll','mime_type' => 'application/json'},'status_code' => 404,'body' => {'hits' => {'hits' => [],'total' => 260,'max_score' => '0'},'_shards' => {'total' => 5,'failures' => [{'index' => undef,'reason' => {'reason' => 'No search context found for id [3691]','type' => 'search_context_missing_exception'},'shard' => -1},{'shard' => -1,'index' => undef,'reason' => {'reason' => 'No search context found for id [3692]','type' => 'search_context_missing_exception'}},{'index' => undef,'reason' => {'reason' => 'No search context found for id [3693]','type' => 'search_context_missing_exception'},'shard' => -1},{'index' => undef,'reason' => {'reason' => 'No search context found for id [3695]','type' => 'search_context_missing_exception'},'shard' => -1},{'shard' => -1,'index' => undef,'reason' => {'reason' => 'No search context found for id [3694]','type' => 'search_context_missing_exception'}}],'failed' => 5,'successful' => 0},'took' => 2,'_scroll_id' => 'c2NhbjswOzE7dG90YWxfaGl0czoyNjA7','timed_out' => bless( do{\(my $o = 0)}, 'JSON::PP::Boolean' )}}