You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Toph <ch...@gmail.com> on 2008/07/11 00:33:15 UTC

Hit javadoc unclear

The following is from the header of org.apache.lucene.search.Hit:

/**
 * Wrapper used by {@link HitIterator} to provide a lazily loaded hit
 * from {@link Hits}.
 *
 * @author Jeremy Rayner
 */
public class Hit implements java.io.Serializable {


The retrieval of the document is 'lazy' in that you can use the iterator to
pass over this hit by checking it's id and if you don't do anything else,
the Document is not loaded.  However, I was thinking that if I did
Hit.get(Fieldname) it would load just that field and not the others using a
FieldSelector and the new lazy-load API.  However, it just loads the whole
document from the Searcher.  

Given the other usage of "lazy load" in Lucene, I think this should be
clairfied:

/**
 * Wrapper used by {@link HitIterator} to provide a hit
 * from {@link Hits}.  For efficiency, the Document backing 
 * a Hit is not loaded unless a field or the document is requested.  
 *
 * @author Jeremy Rayner
 */
public class Hit implements java.io.Serializable {

-- 
View this message in context: http://www.nabble.com/Hit-javadoc-unclear-tp18393316p18393316.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org