Source code for pangea.core.search_indexes
from haystack import indexes
from .models import (
Organization,
SampleGroup,
Sample
)
[docs]class OrganizationIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.CharField(document=True)
name = indexes.CharField(model_attr='name')
[docs] def get_model(self):
return Organization
[docs]class SampleGroupIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.CharField(document=True)
name = indexes.CharField(model_attr='name')
[docs] def get_model(self):
return SampleGroup
[docs]class SampleIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.CharField(document=True)
name = indexes.CharField(model_attr='name')
[docs] def get_model(self):
return Sample