gpt4 book ai didi

具有存储的 copyField 目标的 Solr 原子更新

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

我想结合使用 Solr 原子更新和一些存储 copyField目标字段,这不是推荐的组合 - 所以我希望了解风险。

Solr documentation for Atomic Updates说(我的重点):

The core functionality of atomically updating a document requires that all fields in your schema must be configured as stored (stored="true") or docValues (docValues="true") except for fields which are <copyField/> destinations, which must be configured as stored="false". Atomic updates are applied to the document represented by the existing stored field values. All data in copyField destinations fields must originate from ONLY copyField sources.

但是,我有一些copyField我想设置的目的地 stored=true以便突出显示对他们正确工作(例如,请参见 this question)。

我需要原子更新,以便另一个进程可以修改(不相关的)字段,而不会丢失我的进程索引的数据。

文档警告说:

If destinations are configured as stored, then Solr will attempt to index both the current value of the field as well as an additional copy from any source fields. If such fields contain some information that comes from the indexing program and some information that comes from copyField, then the information which originally came from the indexing program will be lost when an atomic update is made.

但这意味着什么呢?有人可以举一个例子来说明这个信息丢失问题吗?

我不确定“一些来自索引程序的信息和一些来自 copyField 的信息”的具体含义。

做一个安全吗copyField目标已存储,同时自动更新其他 字段,反之亦然?我已通过 Solr 管理控制台对此进行了尝试,但未能证明任何问题,但我想弄清楚什么情况会触发该问题。

最佳答案

这意味着复制字段将从源字段中添加一个额外的值,有效地在您的复制字段中创建一个多值字段,如果它没有被定义为多值,那么该字段将不会是正确的类型,并且不能对其进行进一步的更新,直到您重新索引所有内容。我目前正在为这个确切的问题而苦苦挣扎,因为我们需要将值作为 copyField 响应的一部分返回,这意味着它需要存储,但是如果我们执行原子操作,这样做会破坏文档的结构更新不同的领域。

关于具有存储的 copyField 目标的 Solr 原子更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48300578/

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