localwiki/localwiki — Issue #147: Search weighting sometimes depends on capitalization
Author: philipn
Created: 2011-12-12 20:43:32+00:00
State: open

We should fix search weighting in general.
--------
Page showing bug: See these searches, which should return the same results: searching for "nicholasbarry"; searching for "NicholasBarry"

Bug description: If I search for "NicholasBarry", my user page comes up as the first result - and it ought to, since my user page is the only page with "NicholasBarry" in the title. Pages with "NicholasBarry" as text show up afterward. But if I lowercase the search ("nicholasbarry"), it no longer brings up my user page first. Mostly this is annoying because users shouldn't need to capitalize a username when searching for it - pagename matches should come up ahead of text matches, regardless of whether the capitalization matches.

Oddly, "nicholasBarry" will search correctly, but any other letter capitalized other than the N or the B will result in no search results whatsoever. And if I search for "{U/u}sers/{N/n}icholasBarry" (where the brackets indicate acceptable alternatives), my profile page is the only search result, as it ought to be. But if the B isn't capitalized, no dice. Mostly this is annoying because users shouldn't need to capitalize a username when searching for it - pagename matches should come up ahead of text matches, regardless of whether the capitalization matches.