Question

I have added taggit application to add tags to some user message.

tags = TaggableManager()  

When i index the message and tags in searchindex.py

text = indexes.EdgeNgramField(document=True, use_template=True)
message = indexes.CharField(model_attr='message')
tags = indexes.CharField(model_attr='tags')

When in search i search by any tag , by default it show all the messages associated with tag. Anyone can help how haystack and elastic search index the columns? where it makes any AND relations to the search columns ?

Was it helpful?

Solution

I got the answer. What ever i include in my data template can be searched . And i have to include tag in data template to make the user search by tag name and display the message.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top