laravel - PHP Elasticsearch returning 0.0 for all scores -
i have aws elasticsearch instance provisioned , seeded bunch of band names. if query via curl on command line nice set of weighted results including scores:
curl -xget 'search-mydomain-3gk2dsu32xfb5ar4kcfablqjla.us-west-2.es.amazonaws.com:80/index/bands/_search?q=burn' {"took":13,"timed_out":false,"_shards": {"total":5,"successful":5,"failed":0},"hits": {"total":17,"max_score":5.6469817,"hits": [{"_index":"index","_type":"bands","_id":"17554","_score":5.6469817,"_source":{"id":17554,"band":"burn witch burn"}}, {"_index":"index","_type":"bands","_id":"30730","_score":4.617216,"_source":{"id":30730,"band":"burn halo"}},
however, when use elasticsearch/elasticsearch php package in composer.json file:
"require": { "elasticsearch/elasticsearch": "^2.2"
that ignores _scores:
"hits" => array:3 [ 0 => array:5 [ "_index" => "index" "_type" => "bands" "_id" => "2890" "_score" => 0.0 "_source" => array:2 [ "id" => 2890 "band" => "jack starr's burning starr" ] ] 1 => array:5 [ "_index" => "index" "_type" => "bands" "_id" => "8381" "_score" => 0.0 "_source" => array:2 [ "id" => 8381 "band" => "d. greenfield & j.j. burnel" ] ]
i can't life of me figure out how _scores reflected.
i'm trying in laravel 5.3 application using laravel/scout, query straight forward:
app\band::search('burn')->get();
but problem lies in elasticsearch package i'll dump results in there , see 0.0 scores.
kevin
Comments
Post a Comment