Page MenuHomePhabricator

Template search should find matches with space bar following keyword in the title (Template findability)
Closed, InvalidPublic

Description

Searching for term "Spiel" would not give the template "Spiel des Jahres" as a result. Only when typing "Spiel " with a space bar in the search field, the template would appear on the 4th place. Can such cases with a space bar in the template title be found among the first 10 results?

de:
Als ich durch die Aktion "Eine Vorlage einfügen" (Puzzle-Icon) mit dem Begriff "Spiel" gesucht habe, wurden mir 10 Treffer angezeigt. Da war die Vorlage "Spiel des Jahres", nach der ich suchte, nicht dabei. Mit "SpieldesJahres" habe ich auch nichts gefunden. Erst mit "Spiel " käme die gewünschte Vorlage als 4. Treffer, wenn also mindestens ein Leerzeichen dabei ist.
Ich finde es irgendwie "ungerecht", dass beim Suchbegriff "Spiel" Treffer wie "Navigationsleiste Spiel der Spiele" und "WNBA-Spielerprofil" erscheinen, aber nicht "Spiel des Jahres". Lässt sich da noch was machen, das solche Fälle wie "Spiel des Jahres" unter den ersten 10 Treffern sind, wenn "Spiel" eingegeben wird?

See: https://de.wikipedia.org/w/index.php?title=Wikipedia_Diskussion:Technische_W%C3%BCnsche/Topw%C3%BCnsche/Vorlagen_suchen_und_einf%C3%BCgen#Mit_dem_Suchbegriff_%22Spiel%22_wurde_die_Vorlage_%22Spiel_des_Jahres%22_nicht_gefunden

Event Timeline

I had a quick look. This behavior is – unfortunately – just what CirrusSearch gives us.

Vorlage: Spiel des Jahres appears in both cases, just on different positions (#76 in my test). The reasons are manifold. There is just sooooo much about games in the template namespace. And that particular template is rarely used.

The fact that the space at the end of "Spiel " makes a difference at all (and is not trimmed) is a little "hidden feature" we added intentionally exactly because of situations like this.

Continuing to type "Spiel des" moves the template you are looking for way up to position #2.

I suggest to leave this behavior as it is.

Ok, I understand that there are dozens of templates containing the phrase "Spiel". At the moment, I get the following result if I type in "Spiel"

Tabelle RoundRobin-10Spieler-1Ergebnis-4weiter
Navigationsleiste Spiel der Spiele
Navigationsleiste Spiele von Key (Spieleentwickler)
Spielerstatistik
Pointstreak Spiel
WNBA-Spielerprofil
Spielfigur
Spielwiese
BBL-Spielerprofil
Infobox Spiel

Only one of the first ten hits is a *documented* template. This list appears unsorted to me, but I understand now that the results are sorted by frequency of use, which is welcome. It is conceivable to offer other sort criteria (e.g. preferring prefix search results, or using Levenshtein distance), but this would be too complicated for the normal use case.

The primary reason why I didn't find the template was that I omitted the spaces when continuing the search. This misconception leaded to the search string "SpielDesJahres" with zero results. It's a little bit weird that the program still finds 10 results if I type in "SpielD", and no results, if I type in "SpielDe".

Is it possible to indicate to the user that there are more than 10 results, e,g. by displaying the total number of results? If I know that there are 76 possible hits or even more, then I will think a little bit more about variations of search items to find the correct one.

Another idea I have is to introduce a flag to indicate that the user is searching for documented main templates only, and not for e.g. un-documented sub-templates. Recently, I used an undocumented template and told the author of the template about a problem of using the template. The author instructed me not to use the template because the template was intentionally not documented because of internal use. In this sense, it might be useful to neglect undocumented templates in the search.

Taken as a whole, I would agree to leave the behavior as it is, as long as there is no real improvement on the horizon.

I would like to clean our backlog of reoccurring tasks like this that can be explained by the same misunderstanding. I wrote a longer response at T292974#7863248 that goes into more details.

Only one of the first ten hits is a documented template.

As of now there is no way to prioritize documented templates. There is a separate task for this: T292975: Finding and inserting templates: uprank templates with TemplateData.

I understand now that the results are sorted by frequency of use […]

While usage is a big factor, it's not the only one. Template:Tabelle RoundRobin-10Spieler-1Ergebnis-4weiter for example contains more than 400 words that start with "spiel*".

It's a little bit weird that the program still finds 10 results if I type in "SpielD" […]

It finds the word "Spieldauer".