On Mon, Jun 8, 2015 at 4:16 PM, Brian Wolff <bawo...@gmail.com> wrote:

> The search api (by which I mean query=search in api.php) is somewhat
> poorly documented. You have to dig to find
> https://www.mediawiki.org/wiki/Help:CirrusSearch .


I recently added https://www.mediawiki.org/wiki/API:Search_and_discovery
which clarifies the connection with Help:CirrusSearch, and mentions other
kinds of searching like geosearch.

>
> I would much prefer
> that the relavent documentation was including in the normal api.php
> auto-generated help.


https://gerrit.wikimedia.org/r/216899 changes the
'apihelp-query+search-param-search message' in
https://www.mediawiki.org/wiki/Special:ApiHelp/query+search to
*srsearch*

Search for page titles and page content that match this value. You can use
the search string to invoke special wiki search features, depending on what
its search backend implements.
But API query search can only use CirrusSearch features if it's installed.
I think Extension:CirrusSearch could handle the 'APIGetAllowedParams' hook
to modified this help text. If I understand correctly, it might be easier
to interpose WMF-specific help text that links to mw:Help:CirrusSearch in a
'wikimedia-apihelp-query+search-param-search' key in
extensions/WikimediaMessages/i18n/wikimediaoverrides/en.json ; I tried it
locally and it didn't work.



> Even better would be if that api allowed users to
> specify the options using normal url parameters, (as a separate
> options from using operators in the search string). Its also not
> entirely the most clear from the api that the search options differ
> depending on which extensions you have installed.
>

What do you mean? Beyone special terms in srsearch I'm not aware of any
changes to query+search's sr parameters depending on extensions.


> Additionally, from the help page, its not entirely clear about some of
> the limitations. e.g. You can't do incategory:Foo OR intitle:bar.
> regexes on intitle don't seem to work over the whole title, only word
> level tokens (I think, maybe? I'm a bit unclear on how the regex
> operator works).
>

Yes it's not a full reference.

-- 
=S Page  WMF Tech writer
_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to