I'd expect a 100 % title match (apart from stopword, word order and punctuation) to be first.
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Deskana | T139575 EPIC: Plan to enable BM25 on fulltext search | |||
Resolved | dcausse | T128073 Implement a new fulltext query | |||
Resolved | Deskana | T138996 "San Lorenzo (quartiere di Napoli)" not first match when searching the words in different order |
Event Timeline
See https://phabricator.wikimedia.org/T125083#2055892 for what is wrong, and why it's hard to fix. Discovery's next quarterly goal is to switch to bm25 and remove the referenced "all" field which finally makes it possible to address issues like this.
The short answer would be search as it was implemented a couple years ago improves weight on title matches by copying it multiple times to a field called the "all" field, and searching against that. It completely prevents any kind of optimization such as higher ranking when all words match the title.
Bug mentioned with the example search https://en.wikipedia.org/wiki/Special:Search/fargo_wells_history (see archived result) at https://lists.wikimedia.org/pipermail/wikimedia-l/2016-July/084877.html
T138996's example matches the description of this report too.