# Restrict 0 Hits results logs from search\_slowlog.log

**URL:** <https://discuss.elastic.co/t/restrict-0-hits-results-logs-from-search-slowlog-log/167681>\
**Category:** Elasticsearch\
**Created:** [February 8, 2019, 7:39pm UTC](https://discuss.elastic.co/t/restrict-0-hits-results-logs-from-search-slowlog-log/167681 "2019-02-08T19:39:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anveshdd](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@anveshdd](https://discuss.elastic.co/u/anveshdd)\
**Post date:** [February 8, 2019, 7:39pm UTC](https://discuss.elastic.co/t/restrict-0-hits-results-logs-from-search-slowlog-log/167681/1 "2019-02-08T19:39:43Z")

</div>

Working on elastic search 6.5.2. I added index settings for search\_slowlog and its working perfectly fine and Is there a way that I can log only the successful hits by removing total\_hits[0] results.

**Index Settings:**

```auto
PUT slowsearch/_settings
{
  "index":{
"search.slowlog.threshold.query.warn": "0ms",
"search.slowlog.threshold.query.info": "0ms",
"search.slowlog.threshold.query.debug": "0ms",
"search.slowlog.threshold.query.trace": "0ms",
"search.slowlog.threshold.fetch.warn": "0ms",
"search.slowlog.threshold.fetch.info": "0ms",
"search.slowlog.threshold.fetch.debug": "0ms",
"search.slowlog.threshold.fetch.trace": "0ms"
}}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 8, 2019, 7:39pm UTC](https://discuss.elastic.co/t/restrict-0-hits-results-logs-from-search-slowlog-log/167681/2 "2019-03-08T19:39:43Z")

</div>

Closed on March 8, 2019, 7:39pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
