Commits

mitar  committed c1fe3ee

Rebuilding indexes does not seem to really work if only updating.

  • Participants
  • Parent commits 9ba3a89

Comments (0)

Files changed (2)

File sphinxdoc/forms.py

     def __init__(self, *args, **kwargs):
         slug = kwargs.pop('slug')
         project = Project.objects.get(slug=slug)
-        kwargs['searchqueryset'] = SearchQuerySet().models(Document).filter(
+        kwargs['searchqueryset'] = (kwargs.get('searchqueryset') or SearchQuerySet()).models(Document).filter(
                 project=project.id)
 
         SearchForm.__init__(self, *args, **kwargs)

File sphinxdoc/management/commands/updatedoc.py

 
     def update_haystack(self):
         """Updates Haystack’s search index."""
-        appname = __name__.split('.')[0]
-        call_command('update_index', appname)
+        call_command('rebuild_index', interactive=False)