elastic4s: score stays at 1 with rawQuery
elastic4s rawQuery
will wrap your rawQuery-JSON in another query object.
it's like you would query for
{ "query": { "query": { "bool": { "must": [ { "multi_match": { "query": "${search}",...
just remove your wrapping "query" from you JSON and the response will show varying scores.
Alternatively you can try to use extraSource
instead of rawQuery
, like described in elastic4s docu. although it didn't work for me at all:
ErrorMessage:value extraSource is not a member of com.sksamuel.elastic4s.SearchDefinition