org.neo4j.index.impl.lucene
Class HitsIterator

java.lang.Object
  extended by org.neo4j.helpers.collection.PrefetchingIterator<T>
      extended by org.neo4j.index.impl.lucene.AbstractIndexHits<org.apache.lucene.document.Document>
          extended by org.neo4j.index.impl.lucene.HitsIterator
All Implemented Interfaces:
Iterable<org.apache.lucene.document.Document>, Iterator<org.apache.lucene.document.Document>, IndexHits<org.apache.lucene.document.Document>

public class HitsIterator
extends AbstractIndexHits<org.apache.lucene.document.Document>


Constructor Summary
HitsIterator(Hits hits)
           
 
Method Summary
 float currentScore()
          Returns the score of the most recently fetched item from this iterator (from Iterator.next()).
protected  org.apache.lucene.document.Document fetchNextOrNull()
           
 int size()
          Returns the size of this iterable, in most scenarios this value is accurate while in some scenarios near-accurate.
 
Methods inherited from class org.neo4j.index.impl.lucene.AbstractIndexHits
close, getSingle, iterator
 
Methods inherited from class org.neo4j.helpers.collection.PrefetchingIterator
getPrefetchedNextOrNull, hasNext, next, remove, setPrefetchedNext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Constructor Detail

HitsIterator

public HitsIterator(Hits hits)
Method Detail

fetchNextOrNull

protected org.apache.lucene.document.Document fetchNextOrNull()
Specified by:
fetchNextOrNull in class PrefetchingIterator<org.apache.lucene.document.Document>

currentScore

public float currentScore()
Description copied from interface: IndexHits
Returns the score of the most recently fetched item from this iterator (from Iterator.next()). The range of the returned values is up to the Index implementation to dictate.

Returns:
the score of the most recently fetched item from this iterator.

size

public int size()
Description copied from interface: IndexHits
Returns the size of this iterable, in most scenarios this value is accurate while in some scenarios near-accurate. There's no cost in calling this method. It's considered near-accurate if this IndexHits object has been returned when inside a Transaction which has index modifications, of a certain nature. Also entities (Nodes/Relationships) which have been deleted from the graph, but are still in the index will also affect the accuracy of the returned size.

Returns:
the near-accurate size if this iterable.


Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.