I have read that it isn't possible (and have tried numerous ways) to get 
highlighting working with a has_child query.
Is there anything I could do differently to get that working, outside of 
using nested objects?
Example:
{ 
"query": { 
"bool": { 
"should": [ 
{ 
"query_string": { 
"query": "comment", 
"fields": ["title^2", "body"], 
"use_dis_max": true, 
"default_operator": "and" 
} 
}, 
{ 
"has_child": { 
"type": "comment", 
"boost": 1.0, 
"query": { "term": { "body": "comment" } } 
} 
} 
], 
"minimum_number_should_match": 1 
} 
}, 
"highlight": { 
"number_of_fragments": 1, 
"fragment_size": 150, 
"pre_tags" : ["[BHL]"], 
"post_tags" : ["[EHL]"], 
"fields" : { 
"title": {}, 
"body": {} 
} 
} 
}
Thanks, 
Chip
-- 
You received this message because you are subscribed to the Google Groups "elasticsearch" group. 
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com . 
For more options, visit https://groups.google.com/groups/opt_out .
             
            
               
               
               
            
            
           
          
            
              
                nurikabe  
                (nurikabe)
               
              
                  
                    August 6, 2013, 11:09pm
                   
                   
              2 
               
             
            
              Just looking for this myself.  Pretty sure it's not implemented.
On Monday, May 27, 2013 9:46:07 PM UTC-4, Chip Kellam wrote:
I have read that it isn't possible (and have tried numerous ways) to get 
highlighting working with a has_child query.
Is there anything I could do differently to get that working, outside of 
using nested objects?
Example:
{ 
"query": { 
"bool": { 
"should": [ 
{ 
"query_string": { 
"query": "comment", 
"fields": ["title^2", "body"], 
"use_dis_max": true, 
"default_operator": "and" 
} 
}, 
{ 
"has_child": { 
"type": "comment", 
"boost": 1.0, 
"query": { "term": { "body": "comment" } } 
} 
} 
], 
"minimum_number_should_match": 1 
} 
}, 
"highlight": { 
"number_of_fragments": 1, 
"fragment_size": 150, 
"pre_tags" : ["[BHL]"], 
"post_tags" : ["[EHL]"], 
"fields" : { 
"title": {}, 
"body": {} 
} 
} 
}
Thanks, 
Chip
 
-- 
You received this message because you are subscribed to the Google Groups "elasticsearch" group. 
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com . 
For more options, visit https://groups.google.com/groups/opt_out .