MCPcopy Create free account
hub / github.com/django-haystack/django-haystack / best_match

Method best_match

haystack/query.py:526–528  ·  view source on GitHub ↗

Returns the best/top search result that matches the query.

(self)

Source from the content-addressed store, hash-verified

524 return len(self)
525
526 def best_match(self):
527 """Returns the best/top search result that matches the query."""
528 return self[0]
529
530 def latest(self, date_field):
531 """Returns the most recent search result that matches the query."""

Callers 3

latestMethod · 0.45
test_best_matchMethod · 0.45
test_best_matchMethod · 0.45

Calls

no outgoing calls

Tested by 2

test_best_matchMethod · 0.36
test_best_matchMethod · 0.36