Domanda

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 ?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top