1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-02-06 12:13:01 +00:00
2020-10-30 19:46:46 +01:00

34 lines
813 B
Python

from haystack import indexes
from .models import Participation, Team, Video
class TeamIndex(indexes.ModelSearchIndex, indexes.Indexable):
"""
Index all teams by their name and trigram.
"""
text = indexes.NgramField(document=True, use_template=True)
class Meta:
model = Team
class ParticipationIndex(indexes.ModelSearchIndex, indexes.Indexable):
"""
Index all participations by their team name and team trigram.
"""
text = indexes.NgramField(document=True, use_template=True)
class Meta:
model = Participation
class VideoIndex(indexes.ModelSearchIndex, indexes.Indexable):
"""
Index all teams by their team name and team trigram.
"""
text = indexes.NgramField(document=True, use_template=True)
class Meta:
model = Video