且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

弹性搜索是一个可查询的集合,同时它被添加到索引中

更新时间:2023-02-08 20:28:26

Ad1。答案是不。索引后,文档不能立即可用于搜索。



正确的指南真的很好的一章为什么弹性搜索以这种方式工作。您应该看看这个答案,以便快速解释。



Ad2。刷新您的索引调用 elasticClient.Refresh()



希望这有助于您。


I'm using Nest to insert a list of 60k+ objects into elastic search, specifically calling client.IndexMany(list, indexName).

  1. As the list is inserted, is it query-able? or is it only query-able after the complete list is indexed?
  2. If its the former, is there a way to force it to only be query-able after the list is fully indexed?

Ad1. The answer is no. Document isn't immediately available for search after indexing.

Definitive guide has really nice chapter why elasticsearch works this way. You should have a look on this answers for a quick explanation.

Ad2. To refresh your index call elasticClient.Refresh()

Hope this helps you.