Solr data-config.xml 中链接在一起的多个文档/根实体定义

发布于 2024-12-04 04:05:35 字数 430 浏览 0 评论 0原文

我正在尝试定义 Solr data-config.xml 和 schema.xml 文件,以便我可以拥有多个独立的文档和/或根实体节点,然后将它们链接在一起。看起来 Solr 不会索引除数据配置中根节点的第一个定义之外的任何内容。

我想要实现的是我可以索引从数据库导入的文档。每一行将创建一个文档。这很好并且已经可以工作了。

接下来我想要了解这些文档的上下文。上下文可以更新,在这种情况下我还需要更新 Solr 索引。问题是,如果上下文被索引为文档的子实体,我将需要删除并重新添加涉及的所有文档。

目标是我希望将上下文作为一个单独的实体,并且文档将具有指向它的链接。然后,之前的情况会发生变化,这样我只能删除并重新添加上下文,而它和相关文档之间的链接将保持不变,并且无需在更新期间删除文档。

链接到上下文的文档数量可以是数百到数万个,所以我真的不想重新创建所有文档,以防上下文更新。

I'm trying to define Solr data-config.xml and schema.xml files so that I could have multiple independent document and/or root entity nodes which are then linked together. It seems Solr won't index anything but the first definition of root nodes in data-config.

What I'm trying to achieve is that I could have indexed documents which are imported from database. Each row will create one document. This is fine and already working.

Next I want to have kind of a context for the documents. The context can be updated and in that case I also need to update the Solr index. The issue is that if the context is indexed as a sub entity for the documents I would need to delete and re-add all the documents which are involved.

The goal is that I would like to have the context as a separate entity and the docs would have link to it. Then the previous case would change so that I could only delete and re-add the context while the link between it and related docs would remain unchanged and there would be no need to drop the documents during the udpate.

The amount of documents linked to a context can be anything from hundreds to tens of thousands so I really wouldn't like to recreate all of them in case the context updates.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文