https://bugzilla.wikimedia.org/show_bug.cgi?id=35719

       Web browser: ---
             Bug #: 35719
           Summary: API: list=search&srwhat=nearmatch doesn't work for
                    titles with namespace prefix
           Product: MediaWiki
           Version: unspecified
          Platform: All
               URL: http://en.wikipedia.org/w/api.php?action=query&list=se
                    arch&srwhat=nearmatch&srsearch=Wikipedia:About
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: API
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---


If LuceneSearch is enabled (like on Wikipedia), list=search&srwhat=nearmatch
doesn't work for any titles outside main namespace (see url).

This is due to ApiQuerySearch calling $search->replacePrefixes on the search
term, which is incorrect for "nearmatch" mode. LuceneSearch replaces the
namespace prefixes to an internal format, so "Wikipedia:About" is transformed
to "[4]:About", so the title can't be found anymore.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to