SOLR-我可以在相同的结果中获得“父"字段和“子"字段吗? [英] SOLR - Can I get Parent fields and Child fields in the same result?
问题描述
我正在将SOLR 4.6与父子文档一起使用. 我知道我可以使用'join'或'block join'来查找特定类型(孩子或父母)的文档,
I'm using SOLR 4.6 with Parent and Child documents. I know that I can use 'join' or 'block join' to find documents of specific type (Child or Parent),
但是,我可以在同一响应中获得父文档"字段和子文档"字段吗?
But, can I get Parent doc fields and Child doc fields in the same response?
例如: 如果我有 Person 和 firstName = Bob 和 LastName = Marley 和带有 City = NY
For Example: If I have Person with firstName=Bob and LastName=Marley And Child doc Address with City=NY
我想在结果文档中获取 firstName = Bob , LastName = Marley 和 City = NY .
I would like to get firstName=Bob, LastName=Marley and City=NY in the result document.
推荐答案
尝试索引时间阻止具有父子关系的联接,并在查询中使用扩展组件(Solr 4.8).有关更多详细信息,请参阅Joel的帖子@ http://heliosearch.org/expand-block-join/
Try Index time Block join with parent child relations and use the expand component (Solr 4.8) in the query. For more details check Joel's post @ http://heliosearch.org/expand-block-join/
这篇关于SOLR-我可以在相同的结果中获得“父"字段和“子"字段吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!