提问要多花一点心思哦

关于官网上一段话的翻译

Elasticsearch | 作者 felayman | 发布于2017年02月09日 | 阅读数:3917

It is important to understand that once you get your search results back, Elasticsearch is completely done with the request and does not maintain any kind of server-side resources or open cursors into your results. This is in stark contrast to many other platforms such as SQL wherein you may initially get a partial subset of your query results up-front and then you have to continuously go back to the server if you want to fetch (or page through) the rest of the results using some kind of stateful server-side cursor

这段话我没太看明白,就第一句话其实不是很明白。有大神通俗的解释下吗?
已邀请:

medcl - 今晚打老虎。

赞同来自: Scs martindu

请求无状态

felayman - 专注于搜索的笨鸟

赞同来自: AdaSherry

整个意思是在讲ES的scroll和scan吗?

leighton_buaa

赞同来自:

我的理解:
如果你直接用ES的search,那么每次执行完毕ES并不保存cursor,即你再次执行search的时候,ES会重新从整个索引search;
如果你用scroll,那么ES会记录类似游标cursor的东东(scroll_id),再次执行scroll search的时候,会从游标的位置进行search,就像官网说的
 
While a search request returns a single “page” of results, the scroll API can be used to retrieve large numbers of results (or even all results) from a single search request, in much the same way as you would use a cursor on a traditional database.

 

要回复问题请先登录注册