Dalba claimed this task.
Dalba added a comment.

OK, I can reproduce it now.

So the issue is that if you search for the title "wiki" on cs wikipedia, you'll see WIKA in the results, but that the title is obviously not a match.

Perhaps elastic search has matched the title because of close spelling?

I was first thinking that we might be able to use difflib.SequenceMatcher(...).ratio() to detect the title closeness, but then I tried searching for A and got the title as a match. The difflib's match ratio for this one is 0, so difflib won't work for such cases.

I'm thinking that the search engine's behaviour is too complicated to mimic in our test. I suggest to just assert parameters are correct and the results are page objects with the requested namespace.

I'll send a patch.


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

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Dalba
Cc: Framawiki, Dalba, Aklapper, pywikibot-bugs-list, Dvorapa, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to