зеркало из https://github.com/mozilla/kitsune.git
use settings for SEARCH_MAX_RESULTS
This commit is contained in:
Родитель
41082d31c4
Коммит
bbd7660e61
|
@ -11,7 +11,7 @@ class SearchClient(object):
|
|||
def __init__(self):
|
||||
self.sphinx = SphinxClient()
|
||||
self.sphinx.SetServer(settings.SPHINX_HOST, settings.SPHINX_PORT)
|
||||
self.sphinx.SetLimits(0, 1000)
|
||||
self.sphinx.SetLimits(0, settings.SEARCH_MAX_RESULTS)
|
||||
|
||||
def query(self, query, filters): abstract
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ MIDDLEWARE_CLASSES = (
|
|||
ROOT_URLCONF = 'kitsune.urls'
|
||||
|
||||
TEMPLATE_DIRS = (
|
||||
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
|
||||
# Put strings here, like "/home/html/django_templates"
|
||||
# Always use forward slashes, even on Windows.
|
||||
# Don't forget to use absolute paths, not relative paths.
|
||||
path('templates'),
|
||||
|
@ -118,6 +118,7 @@ SPHINX_PORT = 3312
|
|||
# Sphinx results tweaking
|
||||
SEARCH_FORUM_MIN_AGE = 7 # age before which decay doesn't apply, in days
|
||||
SEARCH_FORUM_HALF_LIFE = 14 # controls the decay rate, in days
|
||||
SEARCH_MAX_RESULTS = 1000
|
||||
SEARCH_RESULTS_PER_PAGE = 10
|
||||
|
||||
#
|
||||
|
|
Загрузка…
Ссылка в новой задаче