Avatar ·

Pesquisa por substring em django + haystack + Whoosh

📁 python, trabalho

Tenho um determinado modelo. Nele são armazenados nomes de filmes. Aqui está a classe do índice:

from haystack import indexesfrom kino.films.models import Filmsclass FilmsIndex(indexes.SearchIndex, indexes.Indexable):    text = indexes.CharField(document=True, use_template=True)    rusname = indexes.CharField(model_attr='rusname')    origname = indexes.CharField(model_attr='origname')    year = indexes.IntegerField(model_attr='year')    def get_model(self)