Here's a poorly tested first pass at a patch to remove Hits->seek().
Is this the direction you were anticipating? If not, I can happily
try other approaches. As it is, it changes Seachable->search() to
call self->TopDocs, and then passes to resulting TopDocs to the new
Hits object at construction. I kept the ability to reset the fetch
iterator, but now a new search is required to extend the results.
Despite being a tiny patch, there are numerous things that could have
been done differently, so feel free to point towards the way you would
prefer.
It seems to pass the test suite, but I haven't done any live testing
beyond the sample dir. Patch is 'svn diff lib t' from within the
kinosearch/perl directory. I can clean it up and change it as you
desire after your feedback.
Thanks!
Nathan Kurz
nate@verse.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hits_seek.patch
Type: application/octet-stream
Size: 9215 bytes
Desc: not available
Url : http://www.rectangular.com/pipermail/kinosearch/attachments/20070713/6a702a6c/hits_seek.obj
Is this the direction you were anticipating? If not, I can happily
try other approaches. As it is, it changes Seachable->search() to
call self->TopDocs, and then passes to resulting TopDocs to the new
Hits object at construction. I kept the ability to reset the fetch
iterator, but now a new search is required to extend the results.
Despite being a tiny patch, there are numerous things that could have
been done differently, so feel free to point towards the way you would
prefer.
It seems to pass the test suite, but I haven't done any live testing
beyond the sample dir. Patch is 'svn diff lib t' from within the
kinosearch/perl directory. I can clean it up and change it as you
desire after your feedback.
Thanks!
Nathan Kurz
nate@verse.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hits_seek.patch
Type: application/octet-stream
Size: 9215 bytes
Desc: not available
Url : http://www.rectangular.com/pipermail/kinosearch/attachments/20070713/6a702a6c/hits_seek.obj