User:Deskana (WMF)/Search/Interwiki

The problem

 * Search infrastructure and performance has been improved such that interwiki search is once again a possibility to have on the Wikimedia wikis.
 * How is this feature to be handled from a product perspective? For example, do we integrate into the current search, or do we have a separate interwiki search?

High-level user requirements

 * A keyword search should present the user with any relevant matches, both on their current wiki and any particularly relevant results from other Wikimedia wikis.
 * If a user searches on wiki X, then the user should, by default, primarily be presented with relevant results from wiki X.

Search box
A person searches for keyword x on a Wikimedia wiki in the search box on all pages. There are several possibilities:
 * 1) There is no article with that title on any Wikimedia wiki.
 * 2) There is no article with this title on the wiki they're currently looking at, but there is an article on another wiki (or multiple wikis).
 * 3) There is an article with that title on their current wiki, but no exact matches on other wikis.
 * 4) There is an article with that title on their current wiki, but there are also exact matches on other wikis.

Currently, 1. and 2. result in a page telling the user their current wiki has no article, and offer a search page for the search term, and make no reference to other wikis. Similarly, 3. and 4. simply take the user to article on their current wiki, also with no reference to other wikis.

Full text search
TBD

Options for interwiki search

 * 1) Separate searches for both the current wiki and interwiki.
 * 2) Interleave interwiki search results with search results for current wiki.
 * 3) This isn't really specific enough to be actionable - how would you sort the interleaved results?
 * 4) Show only local search results, unless there's an option from another wiki that scores higher than all local options.
 * 5) This is a difficult option as the scoring algorithm doesn't work cross wiki.  _something_ would need to change for that to work.

Course of action

 * Have search only display results from current wiki by default (current wiki search).
 * Have an option that can be enabled in search that allows one to also interleave search results from other wikis (interwiki search)
 * If a current wiki search is done, also search other wikis transparently to the user. If there is a high scoring result from another wiki (e.g. at least 95% of the score of the highest scoring result from current wiki), then advise user of that single result and ask them if they want to do an interwiki search.

Random notes
Worth considering whether search should work the same across different namespaces.
 * 1) It currently flattens all namespaces that are searched together.