Class SearchStats
java.lang.Object
org.opensearch.index.search.stats.SearchStats
- All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable
,org.opensearch.core.xcontent.ToXContent
,org.opensearch.core.xcontent.ToXContentFragment
@PublicApi(since="1.0.0")
public class SearchStats
extends Object
implements org.opensearch.core.common.io.stream.Writeable, org.opensearch.core.xcontent.ToXContentFragment
Encapsulates stats for search time
- Opensearch.api:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Holds statistic values for a particular phase.static class
Holds all requests stats.static class
Holder of statistics valuesNested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent
org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable
org.opensearch.core.common.io.stream.Writeable.Reader<V>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V>
-
Field Summary
Fields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionSearchStats
(org.opensearch.core.common.io.stream.StreamInput in) SearchStats
(SearchStats.Stats totalStats, long openContexts, Map<String, SearchStats.Stats> groupStats) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(SearchStats searchStats) void
addTotals
(SearchStats searchStats) void
addTotalsForClosingShard
(SearchStats searchStats) long
getTotal()
void
setSearchRequestStats
(SearchRequestStats searchRequestStats) toString()
org.opensearch.core.xcontent.XContentBuilder
toXContent
(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) void
writeTo
(org.opensearch.core.common.io.stream.StreamOutput out) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opensearch.core.xcontent.ToXContentFragment
isFragment
-
Constructor Details
-
SearchStats
public SearchStats() -
SearchStats
public SearchStats(SearchStats.Stats totalStats, long openContexts, @Nullable Map<String, SearchStats.Stats> groupStats) -
SearchStats
- Throws:
IOException
-
-
Method Details
-
setSearchRequestStats
-
add
-
addTotals
-
addTotalsForClosingShard
-
getTotal
-
getOpenContexts
public long getOpenContexts() -
getGroupStats
-
toXContent
public org.opensearch.core.xcontent.XContentBuilder toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.opensearch.core.xcontent.ToXContent
- Throws:
IOException
-
toString
-
writeTo
- Specified by:
writeTo
in interfaceorg.opensearch.core.common.io.stream.Writeable
- Throws:
IOException
-