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()
SearchHits
totalHits
in interface SearchHits
public long getTotalHits()
SearchHits
getTotalHits
in interface SearchHits
public float maxScore()
SearchHits
maxScore
in interface SearchHits
public float getMaxScore()
SearchHits
getMaxScore
in interface SearchHits
public SearchHit[] hits()
SearchHits
hits
in interface SearchHits
public SearchHit getAt(int position)
SearchHits
getAt
in interface SearchHits
public SearchHit[] getHits()
SearchHits
getHits
in interface SearchHits
public InternalSearchHit[] internalHits()
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent
in interface ToXContent
IOException
public static InternalSearchHits readSearchHits(StreamInput in, InternalSearchHits.StreamContext context) throws IOException
IOException
public static InternalSearchHits readSearchHits(StreamInput in) throws IOException
IOException
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
IOException
public void readFrom(StreamInput in, InternalSearchHits.StreamContext context) throws IOException
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
IOException
public void writeTo(StreamOutput out, InternalSearchHits.StreamContext context) throws IOException
IOException
Copyright © 2009–2016. All rights reserved.