You need to have both in a single srsearch parameter. E.g.
https://en.wikipedia.org/w/api.php?action=query&list=search&srsearc…
--bawolff
On Apr 3, 2015 7:07 AM, "andre" <andrecastro(a)c-e-m.org> wrote:
thank you so much bawolff.
I dont have yet CirrusSeach installed, so I couldn't test in the wiki I
am
working with.
However I tested it in Wikipedia, searching pages in
both
incategory:Synthpop & incategory:2010s_in_music:
https://en.wikipedia.org/w/api.php?action=query&list=search&srsearc…
>
> I'll need to get CirrusSearch installed :)
> cheers!
> On 04/02/2015 03:00 PM, bawolff wrote:
> > If you use list=search, and search for incategory:2013
> > incategory:Graduation_work, it should give you a list of things in both
> > cats, provided the wiki has CirrusSearch installed (this includes all
> > wikimedia wikis).
> >
> > --bawolff
> > On Apr 2, 2015 9:12 AM, "andre" <andrecastro(a)c-e-m.org> wrote:
> >>
> >> Thanks Magnus,
> >>
> >> Yes, it is expectable that no pages appear in both of these categories,
> > as this was not a query Wikipedia to but a wiki
> >> installation I work on, at
http://pzwiki.wdka.nl/mw-mediadesign/
> >>
> >> Do you know if it is possible to do the same kind of category
> > intersection Quick Intersection performs, using the MW API?
> >>
> >> a
> >>
> >>
> >>
> >> On 04/02/2015 01:56 PM, Magnus Manske wrote:
> >>>
> >
https://tools.wmflabs.org/quick-intersection/index.php?lang=en&project=…
>>>
>>> (there don't appear to be any pages in both of these categories,
though)
>>>
>>> On Thu, Apr 2, 2015 at 11:05 AM andre <andrecastro(a)c-e-m.org> wrote:
>>>
>>>>
>>>> Hello,
>>>>
>>>> I have been using Mediawiki API on a few projects.
>>>> I now need to query the API for pages, members of 2 categories.
>>>> The pages have to be members of BOTH Category:Graduation_work and
>>>> Category:2013
>>>>
>>>> I've tried with:
>>>> api.php?format=json&action=query&list=categorymembers&
>>>>
cmlimit=500&cmtitle=Category:Graduation_work&cmtitle=Category:2013
>>>>
>>>> but I realized that what the request is doing is asking only for the
>>>> members of last category, that is Category:2013.
>>>>
>>>> How could I request only the pages that are member of BOTH
categories?
> >>>>
> >>>>
> >>>> I have been searching, but found no answer.
> >>>> Help would be very much appreciated :)
> >>>> cheers
> >>>> a
> >>>>
> >>>>
> >>>> --
> >>>> pinknoi.so
> >>>> bibliotecha.info
> >>>>
> >>>> --..,___.--,--'-,---..-.--+--.,,-,,...
> >>>>
> >>>> _______________________________________________
> >>>> Mediawiki-api mailing list
> >>>> Mediawiki-api(a)lists.wikimedia.org
> >>>>
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
> >>>>
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> Mediawiki-api mailing list
> >>> Mediawiki-api(a)lists.wikimedia.org
> >>>
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
> >>>
> >>
> >>
> >> --
> >> pinknoi.so
> >> bibliotecha.info
> >>
> >> --..,___.--,--'-,---..-.--+--.,,-,,...
> >>
> >> _______________________________________________
> >> Mediawiki-api mailing list
> >> Mediawiki-api(a)lists.wikimedia.org
> >>
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
> >
> >
> >
> > _______________________________________________
> > Mediawiki-api mailing list
> > Mediawiki-api(a)lists.wikimedia.org
> >
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>
>
> --
> pinknoi.so
> bibliotecha.info
>
> --..,___.--,--'-,---..-.--+--.,,-,,...
>
> _______________________________________________
> Mediawiki-api mailing list
> Mediawiki-api(a)lists.wikimedia.org
>
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api