更新时间: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).
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.