Page MenuHomePhabricator

Increase exlimit to a number bigger than 1
Closed, ResolvedPublic1 Estimated Story Points

Description

I was playing with the extracts API today, in preparation for the Multimedia team's work for next quarter, and I spent about 30 minutes trying to debug TextExtracts and core, because I overlooked the fine print on the API documentation that explains TextExtracts will only return one result by default.

As far as I can tell, finding the extracts is a reasonably performant process, and it won't crash the servers to fetch results for a few more pages in the set. However, I'd be interested to know the rationale for the low default.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 19 2016, 7:58 PM
ovasileva triaged this task as Medium priority.Dec 21 2016, 5:39 PM
ovasileva added a project: Readers-Web-Backlog.
ovasileva moved this task from Incoming to Needs Prioritization on the Readers-Web-Backlog board.
Jdlrobson added a subscriber: Jdlrobson.

Open question: What should the new default limit be? max ? some other integer?

MaxSem added a subscriber: MaxSem.Feb 9 2017, 6:48 PM

Why it was done: producing extracts requires parser output, so a full parse can happen if you request full-page extracts. One parse of a large page per request is more than enough. Requesting intro-only extracts with exintro doesn't have this problem.

pmiazga added subscribers: MarkTraceur, pmiazga.EditedApr 11 2017, 3:42 PM

@MarkTraceur how many extracts do you need to retrieve as max? We're trying to define some hard limits.

Jhernandez renamed this task from 1 seems like an unnecessarily strict default limit for number of extracts returned from API to Increase exlimit to a number bigger than 1.Apr 11 2017, 3:48 PM
Jhernandez updated the task description. (Show Details)
Jhernandez added a subscriber: Jhernandez.

@MaxSem That makes sense, so maybe we should close this task. Can't api users increase the exlimit and overload the api though?

A default of 1 doesn't seem very useful.

NHarateh_WMF set the point value for this task to 1.May 17 2017, 5:50 PM

We talked about this and concluded we can't stop users doing this anyway so let's have a more sensible default for when a user requests more than 1 page.

Change 354482 had a related patch set uploaded (by Bmansurov; owner: Bmansurov):
[mediawiki/extensions/TextExtracts@master] Increase default API limit from 1 to 20

https://gerrit.wikimedia.org/r/354482

Change 354482 merged by jenkins-bot:
[mediawiki/extensions/TextExtracts@master] Increase default API limit from 1 to 20

https://gerrit.wikimedia.org/r/354482

phuedx reassigned this task from bmansurov to Jdlrobson.May 22 2017, 5:14 PM
phuedx added a subscriber: bmansurov.