Get interwiki links to a selected language for results of a local search
OpenPublic

Description

The search box suggests titles as you type. If there were a language selector next to it, you could search through the list of articles in that language. Aha, but you say, what's the point of that? If I wanted to read about "Green Eggs and Ham" in Italian ("Prosciutto e uova verdi"), I would go to the Italian Wikipedia and read it there. Well, that's not what I'm proposing; what I mean is, if you selected Italian and searched for "Prosciutto e uova verdi", you would get taken to the English article, "Green Eggs and Ham".

When you type in the search box, it sends an Ajax request off to what I imagine must be an API somewhere for the Wikipedia database which responds with a list of matching article titles. I don't know what the syntax is for that request, so here's some pseudocode for the purposes of illustration:

API?action=titlesearch;query=

Suppose we select Italian and start searching for "prosciutto e". The API call is:

API?action=titlesearch;lang=it;query=prosciutto e

We get one result back, "Prosciutto e uova verdi". As we're operating with Italian selected, clicking it sends the API request:

API?action=showarticle;titlelang=it;title=Prosciutto e uova verdi

That returns "Green Eggs and Ham" and sends the user there.

Of course, this requires a complete table of interlanguage mappings. If I understand it right, that's something that will eventually be provided by Wikidata.


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=1837

bzimport added a project: CirrusSearch.Via ConduitNov 22 2014, 1:19 AM
bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz44038.
Scott created this task.Via LegacyJan 16 2013, 5:33 PM
Aklapper added a comment.Via ConduitMar 26 2013, 11:19 AM

[Merging "MediaWiki extensions/Lucene Search" into "Wikimedia/lucene-search2", see bug 46542. You can filter bugmail for: search-component-merge-20130326 ]

Aklapper added a comment.Via ConduitApr 22 2013, 9:14 AM

Hi Scott. Thanks for taking the time to report this!
This particular problem has already been reported into our bug tracking system, but please feel free to report any further issues you find.

  • This bug has been marked as a duplicate of bug 1837 ***
Aklapper added a comment.Via ConduitApr 22 2013, 9:16 AM

Sorry for dup'ing, not exactly the same request.

Deskana added a comment.Via ConduitFeb 11 2014, 6:13 PM

Moving this feature request to CirrusSearch.

PiRSquared17 added a comment.Via ConduitMar 6 2014, 3:16 AM

Do you mean:
(a) to search itwiki titles and associate them with enwiki pages
(b) to search Wikidata titles in a specific language and associate with enwiki pages
?

Scott added a comment.Via ConduitMar 9 2014, 4:15 PM

(In reply to PiRSquared17 from comment #5)

Do you mean:
(a) to search itwiki titles and associate them with enwiki pages
(b) to search Wikidata titles in a specific language and associate with
enwiki pages
?

The latter - search the subset of Wikidata titles in a specific language that have linked titles in the site's local language.

PiRSquared17 added a comment.Via ConduitMar 18 2014, 10:07 PM

What would the interface for switching search languages be? I'm not sure if this would require an [[mw:RFC]].

Scott added a comment.Via ConduitMar 29 2014, 4:30 PM

I was picturing a dropdown next to the search box, but UI people would need to be involved on this front.

Rich_Farmbrough added a subscriber: Rich_Farmbrough.Via WebDec 7 2014, 1:17 AM

It's worth noting that one often comes to Wikipedia with an unknown term, where there is uncertainty in both the language and meaning. This use case would not be helped very much by this solution, though other cases might.

Nemo_bis added a comment.EditedVia WebDec 18 2014, 9:47 AM

It's worth noting that one often comes to Wikipedia with an unknown term, where there is uncertainty in both the language and meaning.

Can you elaborate? wdsearch is able to produce meaningful results whatever the input language, on any language subdomain.

Nemo_bis changed the title from "Search local titles with another language" to "Get interwiki links to a selected language for results of a local search".Via WebSun, Jul 26, 8:47 AM
Nemo_bis edited projects, added Wikimedia-Interwiki-links; removed CirrusSearch.
Nemo_bis set Security to None.
Nemo_bis added a comment.Via WebSun, Jul 26, 9:48 AM

This has nothing to do with CirrusSearch, because the reporter proposes to follow interlanguage links. Moreover, it's about thew prefix search, not the full text search.

https://it.wikipedia.org/w/api.php?action=opensearch&search=Prosciutto_e_uova exists, after which you can do https://it.wikipedia.org/w/api.php?action=query&prop=langlinks&titles=Prosciutto_e_uova_verdi&lllang=en ; this is standard MediaWiki core functionality.

Nemo_bis added a project: Discovery.Via WebSun, Jul 26, 9:49 AM

Add Comment