codelibs/elasticsearch-dataformat

Size of query ignored?

nikolang opened this issue · 5 comments

I am trying to export 500 of several millions artivles in my ES database. To do so I added the "size":500 - Parameter in the JSON (URL encoded the source-Parameter). This works well for the normal _search but for the _data?format=csv it seems the size is ignored and instead the plugin writes all my million articles into one file.

Can anyone confirm this or give a hint what I am doing wrong?

The default behavior for specifying size is scroll-scan search.
If you want to set a document size, could you try to add search_type request parameter(ex. _data?format=csv&search_type=query_then_fetch).

Oh, please use "from", instead of search_type.
.../_data?format=json&size=10000&from=0&...

I also have this issue. Any help with limit?