public class InternalSearchHits extends Object implements SearchHits
| Modifier and Type | Class and Description |
|---|---|
static class |
InternalSearchHits.StreamContext |
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
static InternalSearchHit[] |
EMPTY |
long |
totalHits |
EMPTY_PARAMS| Constructor and Description |
|---|
InternalSearchHits(InternalSearchHit[] hits,
long totalHits,
float maxScore) |
| Modifier and Type | Method and Description |
|---|---|
static InternalSearchHits |
empty() |
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).
|
InternalSearchHit[] |
internalHits() |
Iterator<SearchHit> |
iterator() |
float |
maxScore()
The maximum score of this query.
|
void |
readFrom(StreamInput in) |
void |
readFrom(StreamInput in,
InternalSearchHits.StreamContext context) |
static InternalSearchHits |
readSearchHits(StreamInput in) |
static InternalSearchHits |
readSearchHits(StreamInput in,
InternalSearchHits.StreamContext context) |
void |
shardTarget(SearchShardTarget shardTarget) |
static InternalSearchHits.StreamContext |
streamContext() |
long |
totalHits()
The total number of hits that matches the search request.
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out) |
void |
writeTo(StreamOutput out,
InternalSearchHits.StreamContext context) |
public static final InternalSearchHit[] EMPTY
public long totalHits
public InternalSearchHits(InternalSearchHit[] hits, long totalHits, float maxScore)
public static InternalSearchHits.StreamContext streamContext()
public static InternalSearchHits empty()
public void shardTarget(SearchShardTarget shardTarget)
public long totalHits()
SearchHitstotalHits in interface SearchHitspublic long getTotalHits()
SearchHitsgetTotalHits in interface SearchHitspublic float maxScore()
SearchHitsmaxScore in interface SearchHitspublic float getMaxScore()
SearchHitsgetMaxScore in interface SearchHitspublic SearchHit[] hits()
SearchHitshits in interface SearchHitspublic SearchHit getAt(int position)
SearchHitsgetAt in interface SearchHitspublic SearchHit[] getHits()
SearchHitsgetHits in interface SearchHitspublic InternalSearchHit[] internalHits()
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent in interface ToXContentIOExceptionpublic static InternalSearchHits readSearchHits(StreamInput in, InternalSearchHits.StreamContext context) throws IOException
IOExceptionpublic static InternalSearchHits readSearchHits(StreamInput in) throws IOException
IOExceptionpublic void readFrom(StreamInput in) throws IOException
readFrom in interface StreamableIOExceptionpublic void readFrom(StreamInput in, InternalSearchHits.StreamContext context) throws IOException
IOExceptionpublic void writeTo(StreamOutput out) throws IOException
writeTo in interface StreamableIOExceptionpublic void writeTo(StreamOutput out, InternalSearchHits.StreamContext context) throws IOException
IOExceptionCopyright © 2009–2017. All rights reserved.