弹性搜索是一个可查询的集合,同时它被添加到索引中 [英] In elastic search is a collection queryable while its being added to the index

查看:130
本文介绍了弹性搜索是一个可查询的集合,同时它被添加到索引中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


    我正在使用Nest将一个60k +对象的列表插入到弹性搜索中,特别是调用client.IndexMany(list,indexName) li>当列表被插入时,是可查询的吗?或者是完整的列表索引后只能查询

  1. 如果是前者,是否有一种方法强制它只有在列表后才可查询完全索引?


解决方案

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.

这篇关于弹性搜索是一个可查询的集合,同时它被添加到索引中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆