How to increase the limit of ES return hits records


(Viphuangwei) #1

Hi There,
I am using _xpack/sql/ to do the searching. By default the return records from ES it's 1000 per page.
If there are millions of records need to be returned. Fetch 1000 records per time in this case it's not effective. it slow down the performance. is there any configuration that increase the return hits records limit?

Thank you.


(David Pilato) #2

The limit for from+page is actually 10000 by default.

You can increase this default value in the index settings (not recommended) or use instead scroll API or search_after feature


(Viphuangwei) #3

Hi David,

Thank you for your responding.
I used ES SQL to do the searching:
Post _xpack/sql/
{
"query": "select column_A from index_A where query( 'super hero', 'type=phrase;default_operator=OR')"
}
It only return 1000 records per page. Am i missing something here? which parameter i need to increase in order to increase the return hits.
Is it 'max_result_window' ?


(Nik Everett) #4

You are missing the cursor. See the docs for how to use it.


(Viphuangwei) #5

Thank you very much Nik , From the link that you provided, There's a parameter "fetch_size", This work.


(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.