org.elasticsearch.search
Interface SearchHits

All Superinterfaces:
Iterable<SearchHit>, Streamable, ToXContent
All Known Implementing Classes:
InternalSearchHits

public interface SearchHits
extends Streamable, ToXContent, Iterable<SearchHit>

The hits of a search request.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.MapParams, ToXContent.Params
 
Field Summary
 
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
 
Method Summary
 SearchHit getAt(int position)
          Return the hit as the provided position.
 SearchHit[] getHits()
          The hits of the search request (based on the search type, and from / size provided).
 float getMaxScore()
          The maximum score of this query.
 long getTotalHits()
          The total number of hits that matches the search request.
 SearchHit[] hits()
          The hits of the search request (based on the search type, and from / size provided).
 float maxScore()
          The maximum score of this query.
 long totalHits()
          The total number of hits that matches the search request.
 
Methods inherited from interface org.elasticsearch.common.io.stream.Streamable
readFrom, writeTo
 
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContent
toXContent
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

totalHits

long totalHits()
The total number of hits that matches the search request.


getTotalHits

long getTotalHits()
The total number of hits that matches the search request.


maxScore

float maxScore()
The maximum score of this query.


getMaxScore

float getMaxScore()
The maximum score of this query.


hits

SearchHit[] hits()
The hits of the search request (based on the search type, and from / size provided).


getAt

SearchHit getAt(int position)
Return the hit as the provided position.


getHits

SearchHit[] getHits()
The hits of the search request (based on the search type, and from / size provided).



Copyright © 2009-2012. All Rights Reserved.