# Next\_doc takes a long time

**URL:** <https://discuss.elastic.co/t/next-doc-takes-a-long-time/183041>\
**Category:** Elasticsearch\
**Created:** [May 28, 2019, 9:22am UTC](https://discuss.elastic.co/t/next-doc-takes-a-long-time/183041 "2019-05-28T09:22:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zyuxing](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zyuxing/32/44143_2.png) [@Zyuxing](https://discuss.elastic.co/u/Zyuxing)\
**Post date:** [May 28, 2019, 9:22am UTC](https://discuss.elastic.co/t/next-doc-takes-a-long-time/183041/1 "2019-05-28T09:22:38Z")

</div>

`{ "size":0, "query": { "more_like_this": { "fields": ["abstractText"], "like": [{ "_index": "pubmed2", "_id": "30948449" }], "max_query_terms": 40, "min_term_freq": 2, "min_doc_freq": 5, "max_doc_freq": 2147483647, "min_word_length": 0, "max_word_length": 0, "minimum_should_match": "50%", "boost_terms": 0.0, "include": true, "fail_on_unsupported_field": true, "boost": 1.0 } } }`  
I searched the searchprofiler above kibana and found next\_doc took a long time. I want to know what next\_doc is mainly used for and how to optimize it!

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/e/2e9a8f50840b265627265e15e22534c2dc9d0e40.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/a/8a7ecdd18fe3f4ed9f77129ddb8dc52d18c19e68.png)

---

<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:** [June 25, 2019, 9:22am UTC](https://discuss.elastic.co/t/next-doc-takes-a-long-time/183041/2 "2019-06-25T09:22:39Z")

</div>

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