First thanks for your informations.
"raw wikitext" mean: client downloads the page content then search.
But my main question is not "how can i search regex in wikitext (client
side)"
my question "how can i regex search on server side" (without download the
page content)
so my query should look like:
this mean* i want to search only "Car" page and is it contain regex
(a+b+c)?* (so this search is *should work on server side*)
if it's true then query return the title and status = found etc. then i
will download "raw wikitext" with second query.
Summary: I will search 1.000.000 page one by one and i don't want to
download each page to my computer then search in my computer (its to lazy
for bandwidth)
I want search my "regex word" from server side (this mean without download
the page content) then if it result return true then i want download the
page content.
(sorry for poor english, and mistakes)
2015-08-15 5:10 GMT+03:00 S Page <spage(a)wikimedia.org>rg>:
On Fri, Aug 14, 2015 at 3:16 PM, Ricordisamoa <
ricordisamoa(a)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=…
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.)
--
=S Page WMF Tech writer
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api