DjangoBB

Django based forum engine

  • You are not logged in.
  • Root
  • » Bugs
  • » No fields were found in any search_indexes. Please correct this before attempting to search. [RSS Feed]

#1 Nov. 7, 2011 16:50:30

celtrun
Registered: 2011-10-25
Posts: 3
Reputation: +  0  -
Profile   Send e-mail  

No fields were found in any search_indexes. Please correct this before attempting to search.

I have in settings.py:
# Haystack settings
HAYSTACK_SITECONF = 'search_sites'
HAYSTACK_SEARCH_ENGINE = 'whoosh'
HAYSTACK_WHOOSH_PATH = os.path.join(PROJECT_ROOT, 'djangobb_index')

Also i have in installed apps whoosh and haystack.
In my project root i have directory `djangobb_indexes` with one file named `hidden`

My search_indexes.py looks like that (but eve if this file is empty i getting this same error):
from haystack import indexes
from haystack import site

import djangobb_forum.models as models

class PostIndex(indexes.RealTimeSearchIndex, indexes.Indexable):
text = indexes.CharField(document=True, use_template=True)
author = indexes.CharField(model_attr='user')
created = indexes.DateTimeField(model_attr='created')
topic = indexes.CharField(model_attr='topic')
category = indexes.CharField(model_attr='topic__forum__category__name')
forum = indexes.IntegerField(model_attr='topic__forum__pk')

site.register(models.Post, PostIndex)

For more, i can say that maybe it is because i remove from /haystack/__init__.py
`handle_registrations()`. I remove it becaues with it i getting only 500 internal error on every page of my site.

It seems that this file is invisible. It lives in /myproject/apps/djangobb_forum/. Any ideas how to fix this? Thanks in advance for any help you might have to offer.

Edited celtrun (Nov. 7, 2011 17:43:43)

Offline

  • Root
  • » Bugs
  • » No fields were found in any search_indexes. Please correct this before attempting to search. [RSS Feed]

Board footer

Moderator control

Powered by DjangoBB

Lo-Fi Version