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=search&format=json&srsearch=gene%20editing&srprop=snippet&indexpageids=&generator=allpages

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@wikimedia.org> wrote:
On Thu, Jan 28, 2016 at 5:21 AM, Luigi Assom <luigi.assom@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.

 

--
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation

_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@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  | PR  | WEB 

T +39 349 3033334 | +1 415 707 9684