Closed seb-b closed 5 years ago
Order results by score rather than pk
Also added the option to annotate results with their score, similar to elastic search.
You can now do the following to mix multiple search results:
results = Page1.objects.search(query).annotate_score("_score").results() result += Page2.objects.search(query).annotate_score("_score").results() return sorted(results, key=lambda r: r._score)
Order results by score rather than pk
Also added the option to annotate results with their score, similar to elastic search.
You can now do the following to mix multiple search results: