开发者

Multiple document / root entity definitions linked together in Solr data-config.xml

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 wo开发者_开发百科uld 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜