Summary
The Solr HTTP API scores and returns results in a different order than solr_query results due to deep paging.
Applies to
All versions.
Symptom
Let's say we have a description field, a TextField, with the following records:
TAPE
TAPE MEASURE
TAPE MEASURE 25'
What the Solr HTTP API will return is any single word exact match first, so TAPE will always be first. However, solr_query results are not returned in the same order.
Cause
The results in solr_query are based on document id, and not originally by score.
Solution
The key is adding a sort key with the value of "score asc", as such:
select description from dev_item.model_search_by_model_number where solr_query ='{"q":description:\"TAPE\"","sort":"score desc","paging":"driver"}';
SUPPORT-1227