Skip to content

Commit

Permalink
[DOCS] Update search-operations.asciidoc (#520)
Browse files Browse the repository at this point in the history
search_type=scan is removed in Elasticsearch 5.x
  • Loading branch information
mariusbancos authored and polyfractal committed Jan 17, 2017
1 parent d16e541 commit 4aba49b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/search-operations.asciidoc
Expand Up @@ -221,7 +221,7 @@ $results = $client->search($params);

=== Scan/Scroll

The Scan/Scroll functionality of Elasticsearch is similar to search, but different in many ways. It works by executing a search query with a `search_type` of `scan`. This initiates a "scan window" which will remain open for the duration of the scan. This allows proper, consistent pagination.
The Scan/Scroll functionality of Elasticsearch is similar to search, but different in many ways. This initiates a "scan window" which will remain open for the duration of the scan. This allows proper, consistent pagination.

Once a scan window is open, you may start `_scrolling` over that window. This returns results matching your query... but returns them in random order. This random ordering is important to performance. Deep pagination is expensive when you need to maintain a sorted, consistent order across shards. By removing this obligation, Scan/Scroll can efficiently export all the data from your index.

Expand All @@ -231,7 +231,6 @@ This is an example which can be used as a template for more advanced operations:
----
$client = ClientBuilder::create()->build();
$params = [
"search_type" => "scan", // use search_type=scan
"scroll" => "30s", // how long between scroll requests. should be small!
"size" => 50, // how many results *per shard* you want back
"index" => "my_index",
Expand Down

0 comments on commit 4aba49b

Please sign in to comment.