Hi,
In my custom search component I'm using the DocSet
(http://lucene.apache.org/solr/api/org/apache/solr/search/DocSet.html)
supplied by a ResponseBuilder to iterate over TermPositions matched by
the users query and output the payload at each position.
If DocSet implemented the Iterable interface
(http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html) I
would be able to do something like:
TermPositions tp = searcher.getReader().termPositions( new Term( fieldName,
term.text() ) );
for( int docId : docs ) {
tp.skipTo( docId );
//gather payloads from this document
}
rather than have to monkey around with the DocIterator. Is this worth
opening an issue and writing a patch? Granted this is pretty trivial.
Or maybe I'm not seeing the easier way.
Tricia