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 a string in the fields of this model. Suppose 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 for "you", he must show me the first and second copies. finally, I need to show results that โyouโ in desc1 are higher than others. for example, in this sample, the second should be higher than the first.
I used hay to search and created a template for this. but I could not solve the priority problem.
source share