我有以下索引文件
{
"id":"data1",
"isParent":"1",
"_childDocuments":[
{
"description":"Benefit and Payroll consultant with HR team ",
"isParent":"2",
"exp":2
},
{
"description":" ERP Avalon Implementation and Support Payroll",
"isParent":"2",
"exp":5
}
]
}
当我搜索exp为7的子文档时,我应该获得上面的父文档。我该如何实现。请指导我。
答案 0 :(得分:0)
您可以使用块联接查询使Solr知道您要隐瞒父项。
示例
http://localhost:8983/solr/collectionName?q={!parent which=isParent:1}exp:7