Skip to content

Commit 3a72eff

Browse files
committed
Increased the number of terms facets returned by the Elasticsearch backend to 100 from the default 10 to work around an issue upstream.
This is hopefully only temporary until it's fixed in Elasticsearch, see elastic/elasticsearch#1776.
1 parent ff3d6bc commit 3a72eff

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/backend_support.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Elasticsearch
4646
* Automatic query building
4747
* "More Like This" functionality
4848
* Term Boosting
49-
* Faceting
49+
* Faceting (up to 100 facets)
5050
* Stored (non-indexed) fields
5151
* Highlighting
5252
* Spatial search

haystack/backends/elasticsearch_backend.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ def build_search_kwargs(self, query_string, sort_by=None, start_offset=0, end_of
325325
kwargs['facets'][facet_fieldname] = {
326326
'terms': {
327327
'field': facet_fieldname,
328+
'size': 100,
328329
},
329330
}
330331

0 commit comments

Comments
 (0)