I'm using SearchKick with elastic search, and am trying to return the score. For example, if I did a search like this:
Profile.search("NYC").first
I'm going to get back the record with the highest score that matches that search. I want to also return the score with each record. I know I can grab the searchkick response and parse though it, but is there a faster way to just merge the score into the records that are returned?
To get all of the Profiles with a corresponding score do this:
Now each element of
results_with_scores
will be of the form: