2024-01-08 13:54:00 +05:30
|
|
|
from haystack import indexes
|
2024-05-07 12:23:36 +05:30
|
|
|
|
2024-01-08 13:54:00 +05:30
|
|
|
from .models import FAQ
|
|
|
|
|
|
2024-03-10 19:37:46 +05:30
|
|
|
|
2024-01-08 13:54:00 +05:30
|
|
|
class FAQIndex(indexes.SearchIndex, indexes.Indexable):
|
|
|
|
|
text = indexes.CharField(document=True, use_template=True)
|
2024-03-10 19:37:46 +05:30
|
|
|
question = indexes.CharField(model_attr="question")
|
|
|
|
|
answer = indexes.CharField(model_attr="answer")
|
2024-01-08 13:54:00 +05:30
|
|
|
|
|
|
|
|
def get_model(self):
|
|
|
|
|
return FAQ
|