xapian-haystack icon indicating copy to clipboard operation
xapian-haystack copied to clipboard

Failure to create index when no data is available

Open kz26 opened this issue 13 years ago • 4 comments

On a fresh installation, Haystack+Xapian fails to create an index (manage.py update_index rebuild_index do nothing) on a fresh install without any data. This causes the webserver to throw an HTTP 500 error: InvalidIndexError: Unable to open index at /var/www/html/myproject/search_index

Refiled in response to https://github.com/toastdriven/django-haystack/issues/473

kz26 avatar Jan 02 '12 03:01 kz26

This only happens if you have no data, correct? There are indexes defined, just no data to index, I'm assuming.

notanumber avatar Jan 03 '12 16:01 notanumber

Yes, that's correct. Since there's no data I suppose that technically there is no need to create a database, but it would be nice to fail gracefully instead.

kz26 avatar Jan 04 '12 00:01 kz26

Absolutely. I'll add this as a "nice to have" feature.

notanumber avatar Jan 04 '12 23:01 notanumber

I had the same problem .. because my client wanted to test his site with a fresh database.

The only workaround I found was to index the django Site app and simply not use it.

h3 avatar Jan 20 '12 15:01 h3