Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

max_revids as a config param. #95

Open
halfak opened this issue Sep 30, 2015 · 2 comments
Open

max_revids as a config param. #95

halfak opened this issue Sep 30, 2015 · 2 comments

Comments

@halfak
Copy link
Member

halfak commented Sep 30, 2015

There should be a way to limit the maximum number of revisions that can be requested from ORES. Right now, ORES will try to deal with as many revids as you can fit in the URL.

@kenrick95
Copy link

Based on this StackOverflow question, the maximum URL length is around 2000 characters. So, theoretically, we can put around 175 revids in the request:

  • For each revid, it will take 11 characters:
    • The revid in wikidatawiki (the wiki with longest dbname that is supposed by ORES) requires 9 characters, and I expect it to grow to 10 characters in near future;
    • plus 1 character for the separator in the request (|)
  • The base URL to make the ORES call requires 74 characters: https://ores.wikimedia.org/v3/scores/wikidatawiki/?models=damaging&revids=

So, (2000 - 74) / 11 ≈ 175


Anyway, what's the maximum number of revids do you recommend in one ORES query? Is there a timeout or caching concern for making such huge request?

Thanks

@halfak
Copy link
Member Author

halfak commented May 29, 2019

I think we ought to limit this to 50 because that's what the mwapi will allow when we're querying content.

I just confirmed that ORES will in fact take more than 50 revids without error or warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants