def ranked_search(self, terms):
return list(self.objects
.annotate(rank=SearchRank(F('search'), SearchQuery(terms, config='english')))
.order_by('-rank')
.values_list('id', flat=True))