J.Done
J.Done

Reputation: 3033

elasticsearch - limit number of search request

When elasticsearch try to search request more than one, sometime it's much slow than search one by one. Therefore I would like to elasticsearch search request work one by one. How should I do this?

Upvotes: 0

Views: 183

Answers (1)

dshockley
dshockley

Reputation: 1494

This indicates a problem with your data model, queries, or cluster configuration. It is not normal or expected for Elasticsearch to be much slower with two concurrent queries than executing those two queries in sequence. You really, really should investigate the underlying problem (start by looking at your logs, if you haven't already). However, to answer the question, you can accomplish this by updating the search thread pool size to 1 (and perhaps increasing the queue_size to compensate).

I want to stress though, that it's really not a good idea to mess with these settings except for advanced use cases (in case you have very imbalanced use between index and search requests, for example).

Upvotes: 1

Related Questions