daevaorn / djapian

High level Xapian integration for Django
Other
6 stars 3 forks source link

Error getting a result by index if index > 0 #104

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A call to get a result by index fails with exception if index != 0

{{{
Traceback (most recent call last):
  File "/home/esizikov/hg/djapian/src/djapian/tests/search.py", line 57, in 
test__get_item__2
    self.assertEqual(result[1].instance.author.name, 'Alex')
  File "/home/esizikov/hg/djapian/src/djapian/resultset.py", line 247, in 
__getitem__
    return list(self._clone(offset=k, limit=1))[k]
IndexError: list index out of range
}}}

Original issue reported on code.google.com by esizi...@gmail.com on 17 Feb 2010 at 5:54

GoogleCodeExporter commented 9 years ago
Done in r336

Original comment by daevaorn on 18 Feb 2010 at 9:47