Wordseer / wordseer

The WordSeer text analysis tool, written in Flask.
http://wordseer.berkeley.edu/
42 stars 16 forks source link

there should be a generic way to pass "limit" and "offset" parameters to any endpoint #169

Open macfarlandian opened 10 years ago

macfarlandian commented 10 years ago

maybe there is already, in which case you don't need to do anything other than tell me what it is ... but currently the default behavior is always to load ALL results from the database, which as you can imagine slows things down when there are like, six thousand rows that match the query.

abendebury commented 10 years ago

A lot of queries have hardcoded values for limit, and some have custom offsets.

But adding in passed-in offsets/limits to every view shouldn't be an issue, we can just have some sensible defaults in case they aren't passed.

macfarlandian commented 10 years ago

probably all of those hard-coded limits and offsets should be passed in explicitly, just to make things less mysterious.

On Fri, Aug 15, 2014 at 4:05 PM, PlasmaSheep notifications@github.com wrote:

A lot of queries have hardcoded values https://bitbucket.org/silverasm/wordseer/src/4cff2494393681137e51a36eeb1c6019ead3549b/src/php/search-suggestions/autosuggest.php?at=new-ui#cl-66 for limit, and some have custom offsets https://bitbucket.org/silverasm/wordseer/src/4cff2494393681137e51a36eeb1c6019ead3549b/src/php/util.php?at=new-ui#cl-404 .

But adding in passed-in offsets/limits to every view shouldn't be an issue, we can just have some sensible defaults in case they aren't passed.

— Reply to this email directly or view it on GitHub https://github.com/Wordseer/wordseer_flask/issues/169#issuecomment-52371953 .

macfarlandian commented 9 years ago

as of now the Sentence List and Sentence Table support this (for the purposes of lazy-loading) but it's still not consistent everywhere.