rLyLmZ
rLyLmZ

Reputation: 495

How to perform searching on large amounts of data efficiently with elastichsearch apis?

I want to use elastichsearch for indexing and searching mechanisms in java. My question is I don't know what I should do if there are large amounts of data in indexing and searching results.

What is the proper searching api for big datas for real time user requests in elastich search? Or do you have any idea about this?

Thanks for help/comments.

Upvotes: 1

Views: 86

Answers (1)

ThomasC
ThomasC

Reputation: 8175

  • At indexing time, you have a bulk API dedicated to performs lots of operations in one single call.

  • At search time, you only retrieve 10 results by default. You can use pagination by setting from/size parameters and to browse larger resultsets, you have a scroll API (documentation here) which is used a bit like a cursor with a DB.

About the real time nature of your search, be aware that, the results are not visible immediately. you may have to wait up to 1s (refresh_interval default value). You can force this refresh operation or lower the refresh_interval parameter value, but this is costly and should be avoided when indexing lots of documents.

Upvotes: 1

Related Questions