Slow Search Help

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.

Thanks again for any help you can provide.

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 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

Thanks again for any help you can provide.

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

Thanks for the help.