Add total hits to the search slow log (#29034)
This commit adds the total hits to the search slow log.
This commit is contained in:
parent
8f0da37c5e
commit
46fcd07153
|
@ -149,8 +149,11 @@ public final class SearchSlowLog implements SearchOperationListener {
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(context.indexShard().shardId()).append(" ");
|
sb.append(context.indexShard().shardId())
|
||||||
sb.append("took[").append(TimeValue.timeValueNanos(tookInNanos)).append("], took_millis[").append(TimeUnit.NANOSECONDS.toMillis(tookInNanos)).append("], ");
|
.append(" ")
|
||||||
|
.append("took[").append(TimeValue.timeValueNanos(tookInNanos)).append("], ")
|
||||||
|
.append("took_millis[").append(TimeUnit.NANOSECONDS.toMillis(tookInNanos)).append("], ")
|
||||||
|
.append("total_hits[").append(context.queryResult().getTotalHits()).append("], ");
|
||||||
if (context.getQueryShardContext().getTypes() == null) {
|
if (context.getQueryShardContext().getTypes() == null) {
|
||||||
sb.append("types[], ");
|
sb.append("types[], ");
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue