[Mediawiki-api] API Question

Joe Osowski josowski at plos.org
Wed Oct 26 23:44:57 UTC 2011


I'm seeing a problem here when paging through large result sets.  It 
appears as though the order and count is changing as I'm walking through 
a given result set.

For instance, I make a call:

http://en.wikipedia.org/w/api.php?srprop=sectiontitle&srlimit=25&srsearch=10.1371%2Fjournal.pone.0008776&action=query&format=xml&list=search&sroffset=0&srwhat=text

And I see I get 689 results.  But wait, I make the call again, and there 
is 690.  OK, you mirror your lucene indexes across a cluster and one is 
slightly out of sync.  Not a big deal.  I adjust the offset and move on.

http://en.wikipedia.org/w/api.php?srprop=sectiontitle&srlimit=25&srsearch=10.1371%2Fjournal.pone.0008776&action=query&format=xml&list=search&sroffset=25&srwhat=text

But now... whenever I get the 689 record set, the order appears 
changed.  I can't page the results without the order being deterministic!

#1 Is there a way to specify order for this command?
#2 Did I find a bug with one your lucene indexes?

Thanks in advance for any insights.
-Joe




More information about the Mediawiki-api mailing list