Files
ihrm/helpdesk/search_indexes.py
Ashwanth Balakrishnan 58be33a8d7 Added Pre-Commit Hooks (#175)
* Added pre commit hook

* Run pre commit hook on all files

---------

Co-authored-by: Horilla <131998600+horilla-opensource@users.noreply.github.com>
2024-05-07 12:23:36 +05:30

13 lines
328 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