Closed
Description
Iterators are expected to allow slicing twice, i.e.
>>> list(range(0,100)[10:15])
[10, 11, 12, 13, 14]
>>> list(range(0,100)[10:][:5])
[10, 11, 12, 13, 14]
This means essentially that [a:a+b]
equals [a:][:b]
With a Search
object slicing twice doesn't work:
>>> Search()[10:15].to_dict()
{'from': 10, 'query': {'match_all': {}}, 'size': 5}
>>> Search()[10:][:5].to_dict()
{'from': 0, 'query': {'match_all': {}}, 'size': 5}
(Sorry for submitting an incomplete issue first, I accidentally hit the wrong key)