Reference Django implementation in the Whoosh docs

Issue #445 new
Radek Svarz
created an issue

I was struggling quite some time to properly integrate Whoosh into Django (1.7).

My use case is to use it for Search as you type "whisperer" using NGRAMs.

Our current implementation initiates and uses Whoosh in the app views.py file (which I do not like).

I have been fighting with putting the code into models file.

Then I found the Managers.py way of implementation ( https://github.com/JoeGermuska/django-whoosh ), which still misses the enforcement of rebuilding index.

The last one I found was this Django app https://github.com/letoosh/djoosh which is quite old and might not reflect the Django 1.8 LTS version.

(from https://groups.google.com/forum/#!searchin/whoosh/django/whoosh/oHvpE34cOIw/boeFGqhfcj4J )

I propose to:

  • setup the reference Django project on the Github / Bitbucket / Gitlab ...
  • link to that project from the Whoosh docs

Comments (3)

  1. Radek Svarz reporter

    Plus consider from https://github.com/django-haystack/django-haystack/blob/master/haystack/backends/whoosh_backend.py this:

            if facets is not None:
                warnings.warn("Whoosh does not handle faceting.", Warning, stacklevel=2)
    
            if date_facets is not None:
                warnings.warn("Whoosh does not handle date faceting.", Warning, stacklevel=2)
    
            if query_facets is not None:
                warnings.warn("Whoosh does not handle query faceting.", Warning, stacklevel=2)
    

    After all I managed to put together the easy usage of Whoosh in the Django app. But took me ages to find the right spots in Django to put the code pieces to.

    Therefore I still suggest above mentioned proposal.

  2. Log in to comment