MCPcopy Index your code
hub / github.com/django-haystack/django-haystack / result_class

Method result_class

haystack/query.py:383–392  ·  view source on GitHub ↗

Allows specifying a different class to use for results. Overrides any previous usages. If ``None`` is provided, Haystack will revert back to the default ``SearchResult`` object.

(self, klass)

Source from the content-addressed store, hash-verified

381 return clone
382
383 def result_class(self, klass):
384 """
385 Allows specifying a different class to use for results.
386
387 Overrides any previous usages. If ``None`` is provided, Haystack will
388 revert back to the default ``SearchResult`` object.
389 """
390 clone = self._clone()
391 clone.query.set_result_class(klass)
392 return clone
393
394 def boost(self, term, boost):
395 """Boosts a certain aspect of the query."""

Callers 11

test_result_classMethod · 0.80
test_result_classMethod · 0.80
test_more_like_thisMethod · 0.80
test_result_classMethod · 0.80
test_more_like_thisMethod · 0.80
test_result_classMethod · 0.80
test_more_like_thisMethod · 0.80
test_result_classMethod · 0.80
test_result_classMethod · 0.80
test_more_like_thisMethod · 0.80

Calls 2

_cloneMethod · 0.95
set_result_classMethod · 0.80

Tested by 11

test_result_classMethod · 0.64
test_result_classMethod · 0.64
test_more_like_thisMethod · 0.64
test_result_classMethod · 0.64
test_more_like_thisMethod · 0.64
test_result_classMethod · 0.64
test_more_like_thisMethod · 0.64
test_result_classMethod · 0.64
test_result_classMethod · 0.64
test_more_like_thisMethod · 0.64