picomon
picomon

Reputation: 1519

Django Haystack and Xapian

I want to use Django Haystack with Xapian on my django site for search function. After setting all the necessary settings. I went ahead to input: manage.py rebuild_index , after inputting 'y' I'm getting an error saying:

No module named xapian_backend.

I can see the xapian backend module in site-packages, but I don't know why Django is not seeing it. How Can I make it work?

Below is my settings:

import os
HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'haystack.backends.xapian_backend.XapianEngine',
        'PATH': 'C:/Python27/Scripts/myweb/xapian_index',
        'INCLUDE_SPELLING': True,
        'BATCH_SIZE': 100,
    },
}

Upvotes: 1

Views: 1603

Answers (2)

Mitchel Kelonye
Mitchel Kelonye

Reputation: 175

Solved this issue by copying the xapian_backend.py to haystack/backends as suggested by the readme

Upvotes: 0

Gringo Suave
Gringo Suave

Reputation: 31890

Engine should be:

'ENGINE': 'xapian_backend.XapianEngine',

It is not included in the haystack package, but is separate. It probably still won't work. It doesn't seem to have been upgraded to work with haystack 2.x.

Update: it has now been updated.

Upvotes: 2

Related Questions