Hi

I have read here [1] and here [2] that it is possible to highlight only
parent documents in block join queries. But I didn't succeed yet:

So here is my nested document example:
[
    {
        "id": "2",
        "type_s": "parent",
        "content_txt": ["apache"],
        "_childDocuments_": [
            {
                "id": "1",
                "type_s": "child",
                "content_txt": ["solr"]
            }
        ]
    }
]

Here is my query (=give me document that have a parent which contain
"apache" term):
curl http://localhost:8983/solr/col/query -d '
fl=id
&hl=on
&hl.fl=*
&q={!child of="type_s:parent"}type_s:parent AND content_txt:apache'

And here is the result:
{
...
  "response":{"numFound":1,"start":0,"docs":[
      {
        "id":"1"}]
  },
  "highlighting":{
    "1":{}}}


I was hoping to get this (=the doc 1 and highlight doc 2: the parent) :

{
...
  "response":{"numFound":1,"start":0,"docs":[
      {
        "id":"1"}]
  },
  "highlighting":{
    "2":{
      "content_txt":["<em>apache</em>"]}}}


[1] 
http://lucene.472066.n3.nabble.com/Fwd-Standard-highlighting-doesn-t-work-for-Block-Join-td4260784.html
[2] 
http://lucene.472066.n3.nabble.com/highlighting-on-child-document-td4238236.html


Thanks by advance,

-- 
nicolas

Reply via email to