I'm learning Haystack and ElasticSearch to implement searches on a website and I've run some tests here, but I noticed that sqs.filter(content='Brazil')
returns me all Brazil posts from the site, but the results are not going as I want:
If I search for the word Brazil will give me the following results:
1- The history of Brazil
2 --Brazil -
3 - Independence of Brazil
4- Rio Grande do Sul Brazil
5- Brazil
Then I saw this function and tested it:
sqs.filter(content='Brazil').best_match()
But you're giving me the following error:
*** IndexError: list index out of range
I want the 5 - Brazil
item to be the first in the list so that the site can show the most married result, is there another function or something of the sort that will do the same as best_match () or am I calling this wrong function? / p>
Detail: I thought about making my own wedding algorithm for words, but I want to save time and make the most of Haystack, in addition to leaving the code cleaner.