gpt4 book ai didi

solr - 如何在 Solr 中替换一组没有 "downtime"的文档?

转载 作者:行者123 更新时间:2023-12-04 22:59:31 25 4
gpt4 key购买 nike

我有一个 solr 独立服务器(不是 solr 云),保存来自几个不同来源的文档。

通常我需要更新源的文档,通常我通过从该源/组中删除所有文档并为该源索引新文档来完成此操作,但这会造成时间间隔,我没有该源的文档,并且这并不理想。
这些文档中的一些可能会从一个更新到另一个保留,一些更改并且可以更新,但有些可能会消失,需要删除。

做到这一点的最佳方法是什么?

有没有办法从源中删除所有文档,但不提交,并在同一事务索引中再次提交该源,然后才提交? (这不会为该来源造成没有信息的时间间隔)

使用核心交换是解决方案吗? (还是我太复杂了?)

最佳答案

似乎您需要一个实时索引,它可以在您更新索引时继续提供查询服务,而不会造成任何停机时间。在某种程度上,您正在部分地重新索引您的数据。

您可以考虑维护两个索引,并使用 ALIASES 与它们交互。
检查此链接:https://www.elastic.co/guide/en/elasticsearch/guide/current/multiple-indices.html
虽然它在 Elasticsearch 网站上,但您可以轻松使用 solr 中的概念。

这是关于如何创建/使用别名的另一个链接
http://blog.cloudera.com/blog/2013/10/collection-aliasing-near-real-time-search-for-really-big-data/

Collection aliases are also useful for re-indexing – especially when dealing with static indices. You can re-index in a new collection while serving from the existing collection. Once the re-index is complete, you simply swap in the new collection and then remove the first collection using your read side aliases.

关于solr - 如何在 Solr 中替换一组没有 "downtime"的文档?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30578920/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com