This has several remaining areas for optimization but it already reduces the size of querysets considerably in cases where you do not need the full document field.
As discussed in #439, it's common for a SearchQuerySet to result in a completely duplicate query when .facet_counts() is called after the query has already been executed. In this common case, we simply return the facet results from that query directly; if for some reason the user wanted to get facet counts before running (or customizing) the main query this will behave identically to v1.2.5.
Using the Django Paginator causes an extra query when it attempts to determine the total number of results (and thus pages). We'll run the query we need before creating the Paginator object so the hit count will already be available, saving an extra query and parsing a non-trivial amount of result data for any query other than the first page
This avoids retrieving more data than necessary simply to determine the record count.
…he implementation in the other engines.
…put for pointing this out!
…me failures. This option defaults to ``True`` for compatibility & to prevent cases where lost connections can break reindexes/searches.
…Q``. Thanks to diegobz for the report!
…update_index``. Thanks to Craig de Stigter & others for the report.
for funding development of this feature.
…ronuz for the report!
…etween 1.6.1 & 1.6.2 that causes only one model to appear as though it is indexed.
…nercustommade for the report!
…` filter. Thanks to jcdyer for the report!