# Slow Search Help

**URL:** https://discuss.elastic.co/t/slow-search-help/7217
**Category:** Elasticsearch
**Created:** [April 4, 2012, 12:37am UTC](https://discuss.elastic.co/t/slow-search-help/7217 "2012-04-04T00:37:49Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Cid\_Dennis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cid_dennis/32/2930_2.png) [@Cid\_Dennis](https://discuss.elastic.co/u/Cid_Dennis)
#### Post date: [April 4, 2012, 12:37am UTC](https://discuss.elastic.co/t/slow-search-help/7217/1 "2012-04-04T00:37:49Z")

</div>

I new to Elastic Search and am using Elastic Search 0.19.1 to index around  
14M products for our site. We make extensive use of facets and boolean  
queries for the searching on our site and have an issue where a lot of the  
searches take more than 500ms and some take many seconds to complete. I  
am new to Elastic search and would really like any help on how to make the  
search performance better. Below is a link to a gist with all the  
configuration and mappings as well as some slow search log lines.

Also right now we do not have a very high load for searches many 10 - 50 a  
minute.

> <https://gist.github.com/ciddennis/2296669>

Thanks again for any help you can provide.

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [April 4, 2012, 3:19pm UTC](https://discuss.elastic.co/t/slow-search-help/7217/2 "2012-04-04T15:19:41Z")

</div>

Few Notes:

1. Use a newer JVM, latest 1.6 (6) or latest 7.
2. Why do you use terms facet on created\_at? Its a date, no? Won't  
date\_histogram make more sense in this case?
3. You are asking for quite a bit of terms facets (size set to 1000). Its  
not bad, but it does adds up in terms of processing needed.
4. Why is the from set to 6600? Are you scrolling through the results? The  
higher the "from", the more expensive it is unless you use scan search type  
if you want to scan through a large result set. In this case, you can issue  
one search request for the facets, and then scroll without them.
5. You have on teh machine 15gb, and you allocate to ES 12gb. That does not  
leave a lot of room for things like file system cache. You do have several  
facets, and those are memory hungry, but if you can, it might make sense to  
decrease the amount of memory allocated to elasticsearch a bit if possible.

The last answer is to simply add more nodes :), those will speed things up  
right away.

On Wed, Apr 4, 2012 at 3:37 AM, Cid Dennis [cid.dennis@gmail.com](mailto:cid.dennis@gmail.com) wrote:

> I new to Elastic Search and am using Elastic Search 0.19.1 to index around  
> 14M products for our site. We make extensive use of facets and boolean  
> queries for the searching on our site and have an issue where a lot of the  
> searches take more than 500ms and some take many seconds to complete. I  
> am new to Elastic search and would really like any help on how to make the  
> search performance better. Below is a link to a gist with all the  
> configuration and mappings as well as some slow search log lines.
> 
> Also right now we do not have a very high load for searches many 10 - 50 a  
> minute.
> 
> [Slow Search Help · GitHub](https://gist.github.com/2296669)
> 
> Thanks again for any help you can provide.

---

<div class="post-metadata">

### Author: ![Cid\_Dennis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cid_dennis/32/2930_2.png) [@Cid\_Dennis](https://discuss.elastic.co/u/Cid_Dennis)
#### Post date: [April 4, 2012, 5:09pm UTC](https://discuss.elastic.co/t/slow-search-help/7217/3 "2012-04-04T17:09:10Z")

</div>

Good information I will work though the list and see how each one effects  
my search performance.

Thanks for the help.

---

<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: [July 6, 2017, 3:33am UTC](https://discuss.elastic.co/t/slow-search-help/7217/4 "2017-07-06T03:33:37Z")

</div>


