metacpan / MetaCPAN-Client

Home of the official MetaCPAN Perl API client.
21 stars 23 forks source link

examples/es_filter.pl is broken #61

Closed oalders closed 7 years ago

oalders commented 7 years ago

olaf$ perl examples/es_filter.pl [Request] [https://fastapi.metacpan.org:443/v1]-[500] {"message":"[Request] [http://127.0.0.1:9200]-[400] Bad Request, called from sub Search::Elasticsearch::Role::Client::Direct::ANON at /home/metacpan/metacpan-api/lib/MetaCPAN/Server/Controller/Scroll.pm line 43. With vars: {'request' => {'method' => 'GET','qs' => {'scroll' => '5m'},'path' => '/_search/scroll/c2NhbjszOzEzNjA1NTA2Ol9UTkpwOElSVGF5X0lYeTJUTzhDT2c7MjIxNDE5MTU6bnh2MXI3MUNTZU9xQTlTcWxHVWtEUTsxMzYwNTUwNzpfVE5KcDhJUlRheV9JWHkyVE84Q09nOzE7dG90YWxfaGl0czo5Mzs%3D','serialize' => 'std','body' => undef,'ignore' => []},'status_code' => 400,'body' => {'took' => 18,'timed_out' => bless( do{\(my $o = 0)}, 'JSON::PP::Boolean' ),'_shards' => {'successful' => 0,'failed' => 3,'total' => 3,'failures' => [{'index' => undef,'reason' => {'reason' => 'field [tests] isn\'t a leaf field','type' => 'illegal_argument_exception'},'shard' => -1}]},'_scroll_id' => 'c2NhbjswOzE7dG90YWxfaGl0czo5Mzs=','hits' => {'total' => 93,'max_score' => '0','hits' => []}}}\n"}, called from sub Search::Elasticsearch::Scroll::next at /Users/olaf/.plenv/versions/5.24.0/lib/perl5/site_perl/5.24.0/MetaCPAN/Client/ResultSet.pm line 65. With vars: {'status_code' => 500,'request' => {'body' => 'c2NhbjszOzEzNjA1NTA2Ol9UTkpwOElSVGF5X0lYeTJUTzhDT2c7MjIxNDE5MTU6bnh2MXI3MUNTZU9xQTlTcWxHVWtEUTsxMzYwNTUwNzpfVE5KcDhJUlRheV9JWHkyVE84Q09nOzE7dG90YWxfaGl0czo5Mzs=','ignore' => [],'path' => '/_search/scroll','method' => 'POST','mime_type' => 'application/json','qs' => {'scroll' => '5m'},'serialize' => 'std'}}

mickeyn commented 7 years ago

"fixed" by 80e058c (the issue is a breaking change in ES regarding returned fields, so far their suggested solution of pulling _source seems more hassle than removing the fields in this case)