On Fri, Aug 14, 2015 at 3:16 PM, Ricordisamoa < ricordisamoa@openmailbox.org> responded:
Il 15/08/2015 00:11, ArtGiray . ha scritto:
why "insource" etc. special query words not showing in api doc....... Anyway thank you it's slow but perfect.
https://en.wikipedia.org/w/api.php?action=help&modules=query%2Bsearch "You can use the search string to invoke special search features, depending on what the wiki's search backend implements."
Yes. The generated API search documentation only knows about the srsearch parameter; what you can do wihin it depends on the search backend. https://www.mediawiki.org/wiki/API:Search_and_discovery also mentions this and presents various options.
my last question is how can i search spesific title?
i can't add "&title=" parameter.
like: https://en.wikipedia.org/w/api.php?action=query&list=search&srwhat=t...
so if title Car contain "a+b+c" then i want a success response?
If you want to find pages whose titles contain "Car", see "intitle" in https://www.mediawiki.org/wiki/Help:CirrusSearch. You can combine intitle: and insource:, thus intitle:Car insource:/a+b+c/. (Be careful escaping the space and the '+' symbols.)
If you know the exact page title and only want to search that, then ask that title for its content and do your own pattern match. You need to figure out whether you want to match in the raw wikitext, or with expanded templates, or the resulting HTML. https://www.mediawiki.org/wiki/API:Parsing_wikitext has some guidance. (There's the new https://www.mediawiki.org/wiki/RESTBase API if you want to match in the generated page HTML and can do some light DOM parsing.)