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