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

Method facet_counts

haystack/query.py:543–554  ·  view source on GitHub ↗

Returns the facet counts found by the query. This will cause the query to execute and should generally be used when presenting the data.

(self)

Source from the content-addressed store, hash-verified

541 return clone
542
543 def facet_counts(self):
544 """
545 Returns the facet counts found by the query.
546
547 This will cause the query to execute and should generally be used when
548 presenting the data.
549 """
550 if self.query.has_run():
551 return self.query.get_facet_counts()
552 else:
553 clone = self._clone()
554 return clone.query.get_facet_counts()
555
556 def stats_results(self):
557 """

Callers 15

get_context_dataMethod · 0.45
extra_contextMethod · 0.45
test_facet_countsMethod · 0.45
test_facet_countsMethod · 0.45
test_facetMethod · 0.45
test_multiple_narrowMethod · 0.45
test_narrowMethod · 0.45
test_date_facetMethod · 0.45
test_facetMethod · 0.45
test_multiple_narrowMethod · 0.45
test_narrowMethod · 0.45
test_date_facetMethod · 0.45

Calls 3

_cloneMethod · 0.95
has_runMethod · 0.80
get_facet_countsMethod · 0.80

Tested by 14

test_facet_countsMethod · 0.36
test_facet_countsMethod · 0.36
test_facetMethod · 0.36
test_multiple_narrowMethod · 0.36
test_narrowMethod · 0.36
test_date_facetMethod · 0.36
test_facetMethod · 0.36
test_multiple_narrowMethod · 0.36
test_narrowMethod · 0.36
test_date_facetMethod · 0.36
test_facetMethod · 0.36
test_multiple_narrowMethod · 0.36