Page MenuHomePhabricator

cl_sortkey for search enhancement
Closed, DuplicatePublic

Description

[Not sure it more relevant for CirrcusSearch or for Opensearch API action but it may be useful enhancement for both]
A good idea for search enhancement from hewiki Village pump is to use sortkey of categories for searching.

Many users try to search first the last name e.g for locating "Barack Obama" article they search for Obama, or Obama, Barack. If the search use suggestions based of default sort of category ({{DEFAULTSORT:Obama, Barack}}), people may find it easier, without need for manual redirect from "Obama, Barack".


Version: unspecified
Severity: enhancement

Details

Reference
bz68452

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:26 AM
bzimport added a project: CirrusSearch.
bzimport set Reference to bz68452.
bzimport added a subscriber: Unknown Object (MLST).

Very interesting and makes sense to me. Storing the defaultsort should be pretty cheap.

Actually, now that I think about it it could be kind of confusing for people searching if the defaultsort is set to something other than just a rearranging of words in the title.

Instead, maybe what we need is to enable $wgCirrusSearchPrefixSearchStartsWithAnyWord everywhere so typing "Obama" will suggest "Barack Obama"

PrefixSearchStartsWithAnyWord seems to be better option, is there already existing configuration for wgCirrusSearchPrefixSearchStartsWithAnyWord?

Is there already existing configuration for $wgCirrusSearchPrefixSearchStartsWithAnyWord?
If not is it hard to implement?

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@CKoerner_WMF I think it can be a nice improvement in addition to CompletionSuggester. What do you think?

We could try but I think it will lead to weird behaviors and it's maybe not what you expect, especially when you'll type more than one word in the query:
Searching for "a high" will probably suggest all Albert Highways.
Pages with short words in the title (e.g. to be or not to be) will be hard to find, searching for "to be" will probably suggest all pages concerning Tony Bennett.
It will maybe work for single word query but will probably tend to rank articles with long titles first...

I'll try to setup a large index with this option so you could have a look.