From 40334c35c4e3f27ec34d47f07c74b42cc8de5901 Mon Sep 17 00:00:00 2001 From: "Mikhail Andreev (aka adw0rd)" Date: Fri, 22 Jun 2012 15:01:00 +0400 Subject: [PATCH] Fixed: Django-sphinx returns not more than 20 resuts (https://github.com/dcramer/django-sphinx/issues/23) --- README.rst | 3 ++- djangosphinx/models.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 66e57c5..83b1902 100644 --- a/README.rst +++ b/README.rst @@ -52,6 +52,7 @@ The following is some example usage:: }, mode='SPH_MATCH_ALL', rankmode='SPH_RANK_NONE', + limit=100 ) queryset = MyModel.search.query('query') @@ -177,4 +178,4 @@ Resources --------- * http://groups.google.com/group/django-sphinx -* http://www.davidcramer.net/code/65/setting-up-django-with-sphinx.html \ No newline at end of file +* http://www.davidcramer.net/code/65/setting-up-django-with-sphinx.html diff --git a/djangosphinx/models.py b/djangosphinx/models.py index be29294..9c83f83 100644 --- a/djangosphinx/models.py +++ b/djangosphinx/models.py @@ -191,7 +191,7 @@ def to_sphinx(value): return int(value) class SphinxQuerySet(object): - available_kwargs = ('rankmode', 'mode', 'weights', 'maxmatches', 'passages', 'passages_opts') + available_kwargs = ('rankmode', 'mode', 'weights', 'maxmatches', 'passages', 'passages_opts', 'limit') def __init__(self, model=None, using=None, **kwargs): self._select_related = False