Hi Brad,
I tried a query with :
params = {'action':'query', *'generator':'search'*,
'gsrnamespace' : 0,
'gsrsearch' : keywords, 'gsrlimit' : 20 , 'prop' :
'pageimages|extracts',
'pilimit' : 'max', 'exintro' : '', 'explaintext' :
'', 'exsentences' : 3,
'exlimit' : 'max', 'redirects' : '' }
I want to try a different query with list=search, but also fetch the
page_IDs for the results.
I tried:
action=query&*list=search*
&format=json&srsearch=gene%20editing&srprop=snippet&*indexpageids*=&
*generator=allpages*
but the ids of generators do not match the id of the list.
https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&list=sear…
*How to fetch pageIds for results in list=search ?*
I would be happy also to fetch decorators (images) in one query, that is
use only one generator to complete the list with pageId and images.
Finally, I'd like to understand the difference between list=search and
generator=search : do they reflect a different indexing or architecture
(e.g. time response and indexing done in elastic search VS lucene )?
On Thu, Jan 28, 2016 at 5:00 PM, Brad Jorsch (Anomie) <bjorsch(a)wikimedia.org
wrote:
> On Thu, Jan 28, 2016 at 5:21 AM, Luigi Assom <luigi.assom(a)gmail.com>
wrote:
>
>> Hello,
>>
>> I would like to better understand the difference in using list=search VS
>> generator=search for full-text search.
>>
>> I've read list=search relies on elastic search: which are the
>> differences in indexing and differences in returned results between
>> list=generator and generator=search ?
>>
>
> Are you actually using generator=search? Below you state that you're using
> generator=allpages, which is obviously going to give you different results.
>
> Try an example like
>
https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&list=sear…
>
<https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&list=search&format=json&srsearch=dj%20tiesto&srprop=snippet%7Ctitlesnippet&indexpageids=&generator=search&gsrsearch=dj%20tiesto>
> instead.
>
>
> --
> Brad Jorsch (Anomie)
> Senior Software Engineer
> Wikimedia Foundation
>
> _______________________________________________
> Mediawiki-api mailing list
> Mediawiki-api(a)lists.wikimedia.org
>
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>
>
--
*Luigi Assom*
Founder & CEO @ XDiscovery - Crazy on Human Knowledge
*Corporate*
www.xdiscovery.com
*Mobile App for knowledge Discovery*
APP STORE <http://tiny.cc/LearnDiscoveryApp> | PR
<http://tiny.cc/app_Mindmap_Wikipedia> | WEB
<http://www.learndiscovery.com/>
T +39 349 3033334 | +1 415 707 9684