Solr - Block join Parent query with many Children constraints

前端 未结 1 622
Happy的楠姐
Happy的楠姐 2020-12-30 18:25

The question is applied for the following nested documents:


  1
  Solr has blo         


        
相关标签:
1条回答
  • 2020-12-30 18:32

    For your use case you can just multiple block join filters:

    q=*:*&
    fq={!parent which="content_type:accommodation"}(+type:comment +comments:SolrCloud)&
    fq={!parent which="content_type:accommodation"}(+type:publisher +address:England)
    

    the first filter clouse will find which parent documents have a child which satisfies condition (+type:comment +comments:SolrCloud).

    The second filter clouse will operate over subset of parent documents that satisfy the first filter. And it will find in this subset the parent documents that satisfy condition (+type:publisher +address:England).

    0 讨论(0)
提交回复
热议问题