use settings for SEARCH_MAX_RESULTS

This commit is contained in:
James Socol 2010-02-11 10:56:11 -08:00
Родитель 41082d31c4
Коммит bbd7660e61
2 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -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
#