Commit 3c9dcc84 by Simon Chen Committed by GitHub

Merge pull request #384 from edx/schen/ECOM-6105

Increase the default facet organizations field limit from 100 to 10000
parents 428843ba 8b5edc15
...@@ -4,6 +4,7 @@ import json ...@@ -4,6 +4,7 @@ import json
from urllib.parse import urlencode from urllib.parse import urlencode
import pytz import pytz
from django.conf import settings
from django.contrib.auth import get_user_model from django.contrib.auth import get_user_model
from django.db.models.query import Prefetch from django.db.models.query import Prefetch
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
...@@ -29,7 +30,7 @@ COMMON_SEARCH_FIELD_ALIASES = { ...@@ -29,7 +30,7 @@ COMMON_SEARCH_FIELD_ALIASES = {
} }
COURSE_RUN_FACET_FIELD_OPTIONS = { COURSE_RUN_FACET_FIELD_OPTIONS = {
'level_type': {}, 'level_type': {},
'organizations': {}, 'organizations': {'size': settings.SEARCH_FACET_LIMIT},
'prerequisites': {}, 'prerequisites': {},
'subjects': {}, 'subjects': {},
'language': {}, 'language': {},
......
...@@ -362,6 +362,9 @@ HAYSTACK_CONNECTIONS = { ...@@ -362,6 +362,9 @@ HAYSTACK_CONNECTIONS = {
HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor' HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor'
# Elasticsearch search query facet "size" option to increase from the default value of "100"
# See https://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-facets-terms-facet.html#_accuracy_control
SEARCH_FACET_LIMIT = 10000
DEFAULT_PARTNER_ID = None DEFAULT_PARTNER_ID = None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment