Hi Sorry, actually I passed the incorrect "from" so it's always show the same country. But I found another issue. I'm using elasticsearch 2.3.1 and php client 2.0. This is the exception I got as I tried to go to the last page 50851. It seems the search api can't handle more than 10000 records? Is that mean it can't return more than that? And I need to use scroll api?
{"error":{"root_cause":[{"type":"query_phase_execution_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [1271275]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level parameter."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"daily_summary_mobile_geo-2017","node":"lyb1R3fjQA-_MERcQw4upA","reason":{"type":"query_phase_execution_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [1271275]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level parameter."}}]},"status":500}