jayvdb created this task.
jayvdb assigned this task to Omegat.
jayvdb added subscribers: pywikipedia-bugs, jayvdb, XZise, Grunny.
jayvdb added projects: PyWikiBot-Interwiki-Map, pywikibot-core, Pywikibot-tests.
jayvdb changed Security from none to none.

TASK DESCRIPTION
  Search on the Wikia website appears to work fine
  
  http://www.wikia.com/Special:Search?search=foo&fulltext=Search
  http://www.wikia.com/Special:Search?search=Seuss&fulltext=Search
  
  But errors result from calling the api, search on text or title
  
  
http://www.wikia.com/api.php?format=jsonfm&action=query&generator=search&gsrwhat=text&gsrsearch=foo
  
http://www.wikia.com/api.php?format=jsonfm&action=query&generator=search&gsrwhat=title&gsrsearch=foo
  
  But a near match search does appear to be working.
  
  
http://www.wikia.com/api.php?format=jsonfm&action=query&generator=search&gsrwhat=nearmatch&gsrsearch=wikia
  
  but not returning results which do appear on the search page.
  
  
http://www.wikia.com/api.php?format=jsonfm&action=query&generator=search&gsrwhat=nearmatch&gsrsearch=Dr.%20Seuss%20Wiki
  
  This is causing a test error in  site_tests.SiteUserTestCase.testSearch
  
  ```
  Traceback (most recent call last):
    File "./tests/site_tests.py", line 887, in testSearch
      se = list(mysite.search("wiki", total=100))
    File "./pywikibot/data/api.py", line 1452, in __iter__
      self.data = self.request.submit()
    File "./pywikibot/data/api.py", line 1071, in submit
      raise APIError(code, info, **result["error"])
  pywikibot.data.api.APIError: gsrsearch-text-disabled: text search is disabled
  ```
  
  The simplest fix for the test suite is to catch and detect 
'gsrsearch-text-disabled' - when the API returns that error, use 
unittest.SkipTest to skip the test without causing a test failure.
  
  Longer term pywikibot needs to detect that search is disabled, like we detect 
whether upload is enabled in APISite.is_uploaddisabled.

TASK DETAIL
  https://phabricator.wikimedia.org/T77968

REPLY HANDLER ACTIONS
  Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign 
<username>.

To: Omegat, jayvdb
Cc: Aklapper, jayvdb, XZise, Grunny, pywikipedia-bugs



_______________________________________________
Pywikipedia-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-bugs

Reply via email to