1

Result window is too large, from + size must be less than or equal to: [10000] but was [20000]

I got this error message when I tried to access size: 200 & from 19800 and I know that i can extend this range by 'index.max_result_window'.

But why it care about 'from' too, not just size? does not elasticsearch return 200 result? If I change index.max_result_window value, is there much cost on my computer to compute this process?

J.Done
  • 2,783
  • 9
  • 31
  • 58
  • Can you explain why do you need to scroll that far in the result set? Both `from` and `size` are important since ES will need to retrieve 20000 docs and sort/rank them only to return you the last 200 hundred ones. – Val Apr 22 '16 at 08:29
  • I need to make paging function with it and there are bunch of data like 500k docs. If I have enough memory to give elastic heap as much as datat size, changing index.max_result_window value is best way to make paging function? – J.Done Apr 22 '16 at 08:38
  • another question, once i set value, elasticsearch keep memory? or os give memory when need? – J.Done Apr 22 '16 at 09:04
  • 3
    Do you think people will page/browse through 500K documents? If that's the case, you should probably change the way you approach the problem. Offering that feature to your users will tax your server unnecessarily, there's probably another way around it. Don't you think? – Val Apr 22 '16 at 09:08
  • What about bring 200 data (index 4,999,800 ~ 5,000,000). In this case, will elasticsearch still need memory for 5000k data? – J.Done Apr 22 '16 at 14:27
  • 2
    Yes, it will, you should not do that... unless you want to put your cluster on its knees, of course. – Val Apr 22 '16 at 14:28
  • That's sad, It's hard to use it instead of oracle. thanks anyway :) – J.Done Apr 22 '16 at 14:33
  • You still haven't explained the use case and why you need to scroll that far in the result set. – Val Apr 22 '16 at 14:34
  • It's like posting board. each page has 200 post and need paging function to go to any page they want. – J.Done Apr 22 '16 at 14:40
  • 1
    Even the 5th million page? Sounds ill-designed... – Val Apr 22 '16 at 14:46
  • I think so. since It's more likely analyzing page, cannot avoid it to show data that they want. – J.Done Apr 22 '16 at 14:51

0 Answers0