I am using django-haystack with solr backend. I’ve saved three songs in model. When I search for q="Hello world". Its displaying only one result. It should be three. Also copied schema.xml and updated the index rebuild_index. Am i missing something? thanks
- Hello World
- hello
- World
Here is my search index.
class SongIndex(indexes.RealTimeSearchIndex, indexes.Indexable):
text = indexes.CharField(document=True, use_template=True)
title = indexes.EdgeNgramField(model_attr='title')
def get_model(self):
return Song
SearchQuery
sqs = SearchQuerySet().models(Song).filter(title=AutoQuery('Hello World'))
Update: Tried
sqs = SearchQuerySet().models(Song).filter(title='Hello World')
Try: