0

If I were to bypass the limit of 10 results in ElasticSearch by adding a size parameter to my query as described here, could that cause performance problems to my ES cluster?

AbuMariam
  • 3,282
  • 13
  • 49
  • 82
  • Whilst I can't reply about performance, what are you trying to achieve? what is the context? – Scuzzy Oct 30 '19 at 22:22
  • @Scuzzy, my query often returns more than 10 results so I need to know if I should implement pagination or can I just request everything? – AbuMariam Oct 30 '19 at 22:25
  • Always best to implement pagination. Think about scalability. But the answer to this depends - it may or may not affect performance based on search query. – Polynomial Proton Oct 30 '19 at 22:42
  • Depending on the size of your records or your UI requirements, pagination is always a good thing, You can even fetch the next set of records in the background if there is benefit for smooth user experience, but then I don't know enough about the context to provide anything further. – Scuzzy Oct 30 '19 at 22:45

1 Answers1

0

It will depend on various parameters

  1. Number of request ES is getting every second/milli-second.
  2. Size of individual document.
  3. Out of total number of request, how many are unique. If we are hitting same query multiple time, then results are returned from cache.
  4. Size of query.

With the increase in number of documents, response size and time will also increase.

This will hamper the performance of application where these results are getting are displayed / delivered. So e.g. UI will go slow to parse all the result and display.

Going for pagination will be future safe as well.

Mohit Bansal
  • 348
  • 3
  • 8