diff --git a/docs/api_methods.asciidoc b/docs/api_methods.asciidoc index 2f355eeea..4a7f423af 100644 --- a/docs/api_methods.asciidoc +++ b/docs/api_methods.asciidoc @@ -1632,7 +1632,7 @@ client.search({ if (response.hits.total > allTitles.length) { // ask elasticsearch for the next set of hits from this search client.scroll({ - scrollId: response.scroll_id, + scrollId: response._scroll_id, scroll: '30s' }, getMoreUntilDone); } else { diff --git a/src/lib/apis/0_90.js b/src/lib/apis/0_90.js index f2d5fa1fe..109a1f5db 100644 --- a/src/lib/apis/0_90.js +++ b/src/lib/apis/0_90.js @@ -87,6 +87,7 @@ api.clearScroll = ca({ } } }, + paramAsBody: 'scrollId', method: 'DELETE' }); diff --git a/src/lib/apis/1_0.js b/src/lib/apis/1_0.js index 9141f78d0..c20ae7432 100644 --- a/src/lib/apis/1_0.js +++ b/src/lib/apis/1_0.js @@ -624,6 +624,7 @@ api.clearScroll = ca({ fmt: '/_search/scroll' } ], + paramAsBody: 'scrollId', method: 'DELETE' }); diff --git a/src/lib/apis/1_1.js b/src/lib/apis/1_1.js index 0ae9b038d..4cc7fb895 100644 --- a/src/lib/apis/1_1.js +++ b/src/lib/apis/1_1.js @@ -656,6 +656,7 @@ api.clearScroll = ca({ fmt: '/_search/scroll' } ], + paramAsBody: 'scrollId', method: 'DELETE' }); diff --git a/src/lib/apis/1_2.js b/src/lib/apis/1_2.js index 1097a3b18..c33af3854 100644 --- a/src/lib/apis/1_2.js +++ b/src/lib/apis/1_2.js @@ -716,6 +716,7 @@ api.clearScroll = ca({ fmt: '/_search/scroll' } ], + paramAsBody: 'scrollId', method: 'DELETE' }); diff --git a/src/lib/apis/1_3.js b/src/lib/apis/1_3.js index 3f15d3a81..0e0ed2d39 100644 --- a/src/lib/apis/1_3.js +++ b/src/lib/apis/1_3.js @@ -754,6 +754,7 @@ api.clearScroll = ca({ fmt: '/_search/scroll' } ], + paramAsBody: 'scrollId', method: 'DELETE' }); diff --git a/src/lib/apis/1_4.js b/src/lib/apis/1_4.js index 5746975e1..3b3548501 100644 --- a/src/lib/apis/1_4.js +++ b/src/lib/apis/1_4.js @@ -754,6 +754,7 @@ api.clearScroll = ca({ fmt: '/_search/scroll' } ], + paramAsBody: 'scrollId', method: 'DELETE' }); diff --git a/src/lib/apis/1_5.js b/src/lib/apis/1_5.js index 033abe853..a56a746fa 100644 --- a/src/lib/apis/1_5.js +++ b/src/lib/apis/1_5.js @@ -754,6 +754,7 @@ api.clearScroll = ca({ fmt: '/_search/scroll' } ], + paramAsBody: 'scrollId', method: 'DELETE' }); diff --git a/src/lib/apis/1_6.js b/src/lib/apis/1_6.js index cf17d300b..9133897e4 100644 --- a/src/lib/apis/1_6.js +++ b/src/lib/apis/1_6.js @@ -763,6 +763,7 @@ api.clearScroll = ca({ fmt: '/_search/scroll' } ], + paramAsBody: 'scrollId', method: 'DELETE' }); diff --git a/src/lib/apis/1_7.js b/src/lib/apis/1_7.js index f62335965..71190a1b5 100644 --- a/src/lib/apis/1_7.js +++ b/src/lib/apis/1_7.js @@ -763,6 +763,7 @@ api.clearScroll = ca({ fmt: '/_search/scroll' } ], + paramAsBody: 'scrollId', method: 'DELETE' }); diff --git a/src/lib/apis/2_0.js b/src/lib/apis/2_0.js index 269ca255f..614c2c4fc 100644 --- a/src/lib/apis/2_0.js +++ b/src/lib/apis/2_0.js @@ -794,6 +794,7 @@ api.clearScroll = ca({ fmt: '/_search/scroll' } ], + paramAsBody: 'scrollId', method: 'DELETE' }); diff --git a/src/lib/apis/2_1.js b/src/lib/apis/2_1.js index 94f44fa94..67854eda4 100644 --- a/src/lib/apis/2_1.js +++ b/src/lib/apis/2_1.js @@ -869,6 +869,7 @@ api.clearScroll = ca({ fmt: '/_search/scroll' } ], + paramAsBody: 'scrollId', method: 'DELETE' }); diff --git a/src/lib/apis/2_2.js b/src/lib/apis/2_2.js index ae7c777dc..f121ee199 100644 --- a/src/lib/apis/2_2.js +++ b/src/lib/apis/2_2.js @@ -875,6 +875,7 @@ api.clearScroll = ca({ fmt: '/_search/scroll' } ], + paramAsBody: 'scrollId', method: 'DELETE' }); diff --git a/src/lib/apis/2_3.js b/src/lib/apis/2_3.js index d72369a5f..6688c7854 100644 --- a/src/lib/apis/2_3.js +++ b/src/lib/apis/2_3.js @@ -875,6 +875,7 @@ api.clearScroll = ca({ fmt: '/_search/scroll' } ], + paramAsBody: 'scrollId', method: 'DELETE' }); diff --git a/src/lib/apis/2_4.js b/src/lib/apis/2_4.js index 63e0f3a36..d0dbf44e9 100644 --- a/src/lib/apis/2_4.js +++ b/src/lib/apis/2_4.js @@ -875,6 +875,7 @@ api.clearScroll = ca({ fmt: '/_search/scroll' } ], + paramAsBody: 'scrollId', method: 'DELETE' }); diff --git a/src/lib/apis/5_0.js b/src/lib/apis/5_0.js index a564c3157..6c4707089 100644 --- a/src/lib/apis/5_0.js +++ b/src/lib/apis/5_0.js @@ -1075,6 +1075,7 @@ api.clearScroll = ca({ fmt: '/_search/scroll' } ], + paramAsBody: 'scrollId', method: 'DELETE' }); diff --git a/src/lib/apis/5_x.js b/src/lib/apis/5_x.js index 9123a4243..f2b26f2d5 100644 --- a/src/lib/apis/5_x.js +++ b/src/lib/apis/5_x.js @@ -1206,6 +1206,7 @@ api.clearScroll = ca({ fmt: '/_search/scroll' } ], + paramAsBody: 'scrollId', method: 'DELETE' }); diff --git a/src/lib/apis/master.js b/src/lib/apis/master.js index 5fbe8daff..c2db42f4e 100644 --- a/src/lib/apis/master.js +++ b/src/lib/apis/master.js @@ -1206,6 +1206,7 @@ api.clearScroll = ca({ fmt: '/_search/scroll' } ], + paramAsBody: 'scrollId', method: 'DELETE' });