has-parent-query.asciidoc 506 B

12345678910111213141516
  1. [[java-query-dsl-has-parent-query]]
  2. ==== Has Parent Query
  3. See {ref}/query-dsl-has-parent-query.html[Has Parent]
  4. [source,java]
  5. --------------------------------------------------
  6. QueryBuilder qb = hasParentQuery(
  7. "blog", <1>
  8. termQuery("tag","something"), <2>
  9. false <3>
  10. );
  11. --------------------------------------------------
  12. <1> parent type to query against
  13. <2> query
  14. <3> whether the score from the parent hit should propogate to the child hit