diff --git a/annotator/model/couch.py b/annotator/model/couch.py index bb8d9d2..8fd71e0 100644 --- a/annotator/model/couch.py +++ b/annotator/model/couch.py @@ -106,11 +106,14 @@ def from_dict(cls, dict_): def search(self, **kwargs): '''Search by arbitrary attributes. + + :param limit: limit the number of results (-1 indicates no limit) + WARNING: at the moment use temporary views. ''' non_query_args = ['offset', 'limit', 'all_fields'] offset = int(kwargs.get('offset', 0)) - limit = int(kwargs.get('limit', -1)) + limit = int(kwargs.get('limit', 20)) for k in non_query_args: if k in kwargs: del kwargs[k]