Streamable, Writeablepublic final class QuerySearchResult extends SearchPhaseResult
TransportResponse.EmptyWriteable.Reader<V>, Writeable.Writer<V>requestId| Constructor | Description |
|---|---|
QuerySearchResult() |
|
QuerySearchResult(long id,
SearchShardTarget shardTarget) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
aggregations(InternalAggregations aggregations) |
|
Aggregations |
consumeAggs() |
Returns and nulls out the aggregation for this search results.
|
ProfileShardResult |
consumeProfileResult() |
Returns and nulls out the profiled results for this search, or potentially null if result was empty.
|
org.apache.lucene.search.TopDocs |
consumeTopDocs() |
Returns and nulls out the top docs for this search results.
|
int |
from() |
|
QuerySearchResult |
from(int from) |
|
float |
getMaxScore() |
|
long |
getTotalHits() |
|
boolean |
hasAggs() |
Returns
true if this query result has unconsumed aggregations |
boolean |
hasConsumedTopDocs() |
Returns
true iff the top docs have already been consumed. |
boolean |
hasProfileResults() |
|
boolean |
hasSearchContext() |
|
boolean |
hasSuggestHits() |
Returns
true if this result has any suggest score docs |
int |
nodeQueueSize() |
|
QuerySearchResult |
nodeQueueSize(int nodeQueueSize) |
|
java.util.List<SiblingPipelineAggregator> |
pipelineAggregators() |
|
void |
pipelineAggregators(java.util.List<SiblingPipelineAggregator> pipelineAggregators) |
|
void |
profileResults(ProfileShardResult shardResults) |
Sets the finalized profiling results for this query
|
QuerySearchResult |
queryResult() |
Returns the query result iff it's included in this response otherwise
null |
void |
readFrom(StreamInput in) |
Set this object's fields from a StreamInput.
|
void |
readFromWithId(long id,
StreamInput in) |
|
static QuerySearchResult |
readQuerySearchResult(StreamInput in) |
|
boolean |
searchTimedOut() |
|
void |
searchTimedOut(boolean searchTimedOut) |
|
long |
serviceTimeEWMA() |
|
QuerySearchResult |
serviceTimeEWMA(long serviceTimeEWMA) |
|
int |
size() |
Returns the maximum size of this results top docs.
|
QuerySearchResult |
size(int size) |
|
DocValueFormat[] |
sortValueFormats() |
|
Suggest |
suggest() |
|
void |
suggest(Suggest suggest) |
|
java.lang.Boolean |
terminatedEarly() |
|
void |
terminatedEarly(boolean terminatedEarly) |
|
org.apache.lucene.search.TopDocs |
topDocs() |
|
void |
topDocs(org.apache.lucene.search.TopDocs topDocs,
DocValueFormat[] sortValueFormats) |
|
void |
writeTo(StreamOutput out) |
Write this object's fields to a StreamOutput.
|
void |
writeToNoId(StreamOutput out) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfetchResult, getRequestId, getSearchShardTarget, getShardIndex, setSearchShardTarget, setShardIndexremoteAddress, remoteAddresspublic QuerySearchResult()
public QuerySearchResult(long id,
SearchShardTarget shardTarget)
public QuerySearchResult queryResult()
SearchPhaseResultnullqueryResult in class SearchPhaseResultpublic void searchTimedOut(boolean searchTimedOut)
public boolean searchTimedOut()
public void terminatedEarly(boolean terminatedEarly)
public java.lang.Boolean terminatedEarly()
public org.apache.lucene.search.TopDocs topDocs()
public boolean hasConsumedTopDocs()
true iff the top docs have already been consumed.public org.apache.lucene.search.TopDocs consumeTopDocs()
java.lang.IllegalStateException - if the top docs have already been consumed.public void topDocs(org.apache.lucene.search.TopDocs topDocs,
DocValueFormat[] sortValueFormats)
public DocValueFormat[] sortValueFormats()
public boolean hasAggs()
true if this query result has unconsumed aggregationspublic Aggregations consumeAggs()
java.lang.IllegalStateException - if the aggregations have already been consumed.public void aggregations(InternalAggregations aggregations)
public ProfileShardResult consumeProfileResult()
java.lang.IllegalStateException - if the profiled result has already been consumed.public boolean hasProfileResults()
public void profileResults(ProfileShardResult shardResults)
shardResults - The finalized profilepublic java.util.List<SiblingPipelineAggregator> pipelineAggregators()
public void pipelineAggregators(java.util.List<SiblingPipelineAggregator> pipelineAggregators)
public Suggest suggest()
public void suggest(Suggest suggest)
public int from()
public QuerySearchResult from(int from)
public int size()
public QuerySearchResult size(int size)
public long serviceTimeEWMA()
public QuerySearchResult serviceTimeEWMA(long serviceTimeEWMA)
public int nodeQueueSize()
public QuerySearchResult nodeQueueSize(int nodeQueueSize)
public boolean hasSuggestHits()
true if this result has any suggest score docspublic boolean hasSearchContext()
public static QuerySearchResult readQuerySearchResult(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic void readFrom(StreamInput in) throws java.io.IOException
StreamablereadFrom in interface StreamablereadFrom in class TransportMessagejava.io.IOExceptionpublic void readFromWithId(long id,
StreamInput in)
throws java.io.IOException
java.io.IOExceptionpublic void writeTo(StreamOutput out) throws java.io.IOException
StreamablewriteTo in interface StreamablewriteTo in interface WriteablewriteTo in class TransportMessagejava.io.IOExceptionpublic void writeToNoId(StreamOutput out) throws java.io.IOException
java.io.IOExceptionpublic long getTotalHits()
public float getMaxScore()