Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/reference/search/profile.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ This yields the following aggregation profile output:
{
"aggregations" : [
{
"type" : "LongTermsAggregator",
"type" : "NumericTermsAggregator",
"description" : "my_scoped_agg",
"time_in_nanos" : 195386,
"breakdown" : {
Expand All @@ -796,6 +796,7 @@ This yields the following aggregation profile output:
"collect_count" : 4
},
"debug": {
"result_strategy": "long_terms",
"total_buckets": 4
}
},
Expand All @@ -815,7 +816,7 @@ This yields the following aggregation profile output:
},
"children" : [
{
"type" : "LongTermsAggregator",
"type" : "NumericTermsAggregator",
"description" : "my_level_agg",
"time_in_nanos" : 160329,
"breakdown" : {
Expand All @@ -829,6 +830,7 @@ This yields the following aggregation profile output:
"collect_count" : 4,
},
"debug": {
"result_strategy": "long_terms",
"total_buckets": 4
}
}
Expand All @@ -845,10 +847,10 @@ This yields the following aggregation profile output:
// TESTRESPONSE[s/"id": "\[P6-vulHtQRWuD4YnubWb7A\]\[test\]\[0\]"/"id": $body.profile.shards.0.id/]

From the profile structure we can see that the `my_scoped_agg` is internally
being run as a `LongTermsAggregator` (because the field it is aggregating,
being run as a `NumericTermsAggregator` (because the field it is aggregating,
`likes`, is a numeric field). At the same level, we see a `GlobalAggregator`
which comes from `my_global_agg`. That aggregation then has a child
`LongTermsAggregator` which comes from the second term's aggregation on `likes`.
`NumericTermsAggregator` which comes from the second term's aggregation on `likes`.

The `time_in_nanos` field shows the time executed by each aggregation, and is
inclusive of all children. While the overall time is useful, the `breakdown`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,8 @@ setup:
---
"profiler":
- skip:
version: " - 7.8.99"
reason: debug information added in 7.9.0
version: " - 7.99.99"
reason: debug information added in 7.9.0 (change backporting to 7.9.0)
- do:
bulk:
index: test_1
Expand Down Expand Up @@ -782,7 +782,8 @@ setup:
field: number
- match: { aggregations.n_terms.buckets.0.key: 1 }
- match: { aggregations.n_terms.buckets.1.key: 3 }
- match: { profile.shards.0.aggregations.0.type: LongTermsAggregator }
- match: { profile.shards.0.aggregations.0.type: NumericTermsAggregator }
- match: { profile.shards.0.aggregations.0.description: n_terms }
- match: { profile.shards.0.aggregations.0.breakdown.collect_count: 4 }
- match: { profile.shards.0.aggregations.0.debug.result_strategy: long_terms }
- match: { profile.shards.0.aggregations.0.debug.total_buckets: 2 }
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public void testXContentResponse() throws Exception {

}

public void testDeletesIssue7951() throws Exception {
public void testPopularTermManyDeletedDocs() throws Exception {
String settings = "{\"index.number_of_shards\": 1, \"index.number_of_replicas\": 0}";
assertAcked(prepareCreate(INDEX_NAME).setSettings(settings, XContentType.JSON)
.setMapping("text", "type=keyword", CLASS_FIELD, "type=keyword"));
Expand Down Expand Up @@ -237,7 +237,7 @@ public void testDeletesIssue7951() throws Exception {
significantTerms("sig_terms")
.field(TEXT_FIELD)
.minDocCount(1)));
}else
} else
{
request = client().prepareSearch(INDEX_NAME)
.addAggregation(
Expand Down Expand Up @@ -477,8 +477,7 @@ public void testScriptScore() throws ExecutionException, InterruptedException, I
.subAggregation(significantText("mySignificantTerms", TEXT_FIELD)
.significanceHeuristic(scriptHeuristic)
.minDocCount(1).shardSize(2).size(2)));
}else
{
} else {
request = client().prepareSearch(INDEX_NAME)
.addAggregation(terms("class").field(CLASS_FIELD)
.subAggregation(significantTerms("mySignificantTerms")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class DoubleTerms extends InternalMappedTerms<DoubleTerms, DoubleTerms.Bu
public static final String NAME = "dterms";

static class Bucket extends InternalTerms.Bucket<Bucket> {
private final double term;
double term;

Bucket(double term, long docCount, InternalAggregations aggregations, boolean showDocCountError, long docCountError,
DocValueFormat format) {
Expand Down

This file was deleted.

This file was deleted.

Loading