Hey All, In a recent project, I implemented a diversification component as a SearchComponent, intended to be used for diversifying the result set originally construed by lucene/solr using some arbitrary configuration XML. To this end, I found myself needing some DocList operations which were surprisingly absent. These are quite rudimentary and have a small footprint on the objects involved to my mind, so i'm posting this suggestion for adding them. In particular: - adding a reverseIterator() method which will allow iterating over the doclist in reverse ( very straightforward implementation, similar to the currently existing iterator() ) - adding some List-like 'block operations', i.e extending a DocList d1 with another d2 by issuing d1.extend(d2). I'm thinking python-like list object extend(), so that all objects involved are immutable and this will in effect return a new object representing the resulting list. Note that this is decidedly different than set operations since here we are interested in maintaining the list ordering(s) involved. No duplicate checks should be made to begin with, so this can be a very basic operation (perhaps some checks to make sure both lists return same value for hasScores() or so to avoid some insanity.. )
If this strikes anyone as relevant I'd be happy to post a patch, Best Regards, Chak -- View this message in context: http://www.nabble.com/DocSlice-Interface-tp22152252p22152252.html Sent from the Solr - Dev mailing list archive at Nabble.com.
