I have a model like this:
class MyModel(models.Model):
desc1 = models.TextField(blank=True, default="")
desc2 = models.TextField(blank=True, default="")
I want to search string on fields of this model. Assume these instances of MyModel:
1: desc1="ABc?", desc2="asdasd you"
2: desc1="Hello, How are you?", desc2="Thank you!"
3: desc1="ABc?", desc2="ajdf"
when I search "you", it should show me, first and second instances. finally I need to show the results which have "you" in desc1 higher than others. for example, in this sample, second one should be higher than first one.
I have used, haystack for search and created a template for this. but I couldn't solve the priority problem.