Page MenuHomePhabricator

Searching should allow results outside the app language
Closed, DeclinedPublic

Description

Steps to reproduce

  1. Change the app language to English.
  2. Search for "antonin sochor" or "Antonín Sochor".

Expected results

Article for Antonín Sochor is shown with a little language code overlay icon to indicate the language differs.

Actual results

The Antonín Sochor article was not shown.

screenshot-2016-03-07-12-50-40-521853083.png (2×1 px, 452 KB)

Queries

English prefix search

https://en.wikipedia.org/w/api.php?action=query&format=json&generator=prefixsearch&redirects=true&gpssearch=antonin%20sochor&gpsnamespace=0&gpslimit=20&list=search&srsearch=antonin%20sochor&srnamespace=0&srwhat=text&srinfo=suggestion&srprop=&sroffset=0&srlimit=1&prop=pageterms%7Cpageimages&wbptterms=description&piprop=thumbnail&pithumbsize=320&pilimit=20&continue=

{
  "batchcomplete": "",
  "continue": {
    "sroffset": 1,
    "continue": "-||pageterms|pageimages"
  },
  "query": {
    "searchinfo": {
      "suggestion": "antonio soccer",
      "suggestionsnippet": "<em>antonio soccer</em>"
    },
    "search": [
      {
        "ns": 0,
        "title": "Petr Vopěnka"
      }
    ]
  }
}
Czech prefix search

https://cs.wikipedia.org/w/api.php?action=query&format=json&generator=prefixsearch&redirects=true&gpssearch=antonin%20sochor&gpsnamespace=0&gpslimit=20&list=search&srsearch=antonin%20sochor&srnamespace=0&srwhat=text&srinfo=suggestion&srprop=&sroffset=0&srlimit=1&prop=pageterms%7Cpageimages&wbptterms=description&piprop=thumbnail&pithumbsize=320&pilimit=20&continue=

{
  "batchcomplete": "",
  "continue": {
    "sroffset": 1,
    "continue": "-||pageterms|pageimages"
  },
  "query": {
    "pages": {
      "359227": {
        "pageid": 359227,
        "ns": 0,
        "title": "Antonín Sochor",
        "index": 1,
        "terms": {
          "description": [
            "český válečník"
          ]
        },
        "thumbnail": {
          "source": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Dukla_busta_A._Sochor.jpg/194px-Dukla_busta_A._Sochor.jpg",
          "width": 194,
          "height": 320
        }
      },
      "814161": {
        "pageid": 814161,
        "ns": 0,
        "title": "Antonín Sochor (matematik)",
        "index": 2,
        "terms": {
          "description": [
            "český člen českého Parlamentu (1992-1996), logik, matematik a místní politik"
          ]
        }
      }
    },
    "searchinfo": {
      "suggestion": "antonín sochor",
      "suggestionsnippet": "<em>antonín</em> sochor"
    },
    "search": [
      {
        "ns": 0,
        "title": "Alpské lyžování na zimních olympijských hrách"
      }
    ]
  }
}
English full text search

https://en.wikipedia.org/w/api.php?action=query&format=json&prop=pageterms%7Cpageimages%7Cpageprops&ppprop=mainpage%7Cdisambiguation&wbptterms=description&generator=search&gsrsearch=antonin%20sochor&gsrnamespace=0&gsrwhat=text&gsrinfo=&gsrprop=redirecttitle&gsrlimit=20&piprop=thumbnail&pithumbsize=320&pilimit=20&continue=

{
  "batchcomplete": "",
  "query": {
    "pages": {
      "424279": {
        "pageid": 424279,
        "ns": 0,
        "title": "Constitution of the Czech Republic",
        "index": 5,
        "thumbnail": {
          "source": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4f/Sb%C3%ADrka_z%C3%A1kon%C5%AF_1993_%C4%8D%C3%A1stka_001_strana_01.png/213px-Sb%C3%ADrka_z%C3%A1kon%C5%AF_1993_%C4%8D%C3%A1stka_001_strana_01.png",
          "width": 213,
          "height": 320
        }
      },
      "7471026": {
        "pageid": 7471026,
        "ns": 0,
        "title": "Czechoslovakia at the 1976 Winter Olympics",
        "index": 3,
        "thumbnail": {
          "source": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/cb/Flag_of_the_Czech_Republic.svg/320px-Flag_of_the_Czech_Republic.svg.png",
          "width": 320,
          "height": 213
        }
      },
      "25725792": {
        "pageid": 25725792,
        "ns": 0,
        "title": "Eduard Ovčáček",
        "index": 4,
        "terms": {
          "description": [
            "Czech graphic, painter, sculptor and university educator"
          ]
        },
        "thumbnail": {
          "source": "https://upload.wikimedia.org/wikipedia/commons/thumb/8/8a/Eduard_Ov%C4%8D%C3%A1%C4%8Dek.jpg/320px-Eduard_Ov%C4%8D%C3%A1%C4%8Dek.jpg",
          "width": 320,
          "height": 214
        }
      },
      "400853": {
        "pageid": 400853,
        "ns": 0,
        "title": "Hero of the Soviet Union",
        "index": 2,
        "thumbnail": {
          "source": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/9a/Golden_Star_medal_473.jpg/320px-Golden_Star_medal_473.jpg",
          "width": 320,
          "height": 244
        }
      },
      "3105466": {
        "pageid": 3105466,
        "ns": 0,
        "title": "Petr Vopěnka",
        "index": 1,
        "terms": {
          "description": [
            "Czech minister of education, youth and sport of the CR, philosopher and mathematician"
          ]
        },
        "thumbnail": {
          "source": "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b3/Vopenka.jpg/248px-Vopenka.jpg",
          "width": 248,
          "height": 320
        }
      },
      "46773775": {
        "pageid": 46773775,
        "ns": 0,
        "title": "St. Wenceslas Church in Zderaz, Prague",
        "index": 6,
        "thumbnail": {
          "source": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/96/St._Wenceslas%27_Church_1.JPG/320px-St._Wenceslas%27_Church_1.JPG",
          "width": 320,
          "height": 240
        }
      }
    }
  }
}

Note: verify that the MW API supports page results from other wikis where the page is not present in the current wiki.

Environments observed

App version: 9b17528e88becd87d7920f44ab2030abd18ffe04
Android OS versions: API 23
Device model: Nexus 6P
Device language: English

Event Timeline

RHo added a subscriber: RHo.

The idea to show results in other languages is in T191075, but scoping only to languages that the user has indicated they can read in.