The Hits type exposes the following members.

Methods

  NameDescription
Public methodDoc
Returns the stored fields of the nth document in this set.

Documents are cached, so that repeated requests for the same element may return the same Document object.

Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodId
Returns the id for the nth document in this set. Note that ids may change when the index changes, so you cannot rely on the id to be stable.
Public methodIterator
Returns a {@link HitIterator} to navigate the Hits. Each item returned from {@link Iterator#next()} is a {@link Hit}.

Caution: Iterate only over the hits needed. Iterating over all hits is generally not desirable and may be the source of performance issues. If you need to iterate over many or all hits, consider using a search method that takes a {@link HitCollector}.

Public methodLength
Returns the total number of hits available in this set.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodScore
Returns the score for the nth document in this set.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)

Fields

  NameDescription
Public fielddebugCheckedForDeletions

See Also