Solr data-config.xml 中链接在一起的多个文档/根实体定义
我正在尝试定义 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论