Files
ihrm/helpdesk/search_indexes.py
2024-03-10 14:07:46 +00:00

12 lines
327 B
Python

from haystack import indexes
from .models import FAQ
class FAQIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.CharField(document=True, use_template=True)
question = indexes.CharField(model_attr="question")
answer = indexes.CharField(model_attr="answer")
def get_model(self):
return FAQ