Top Children Query

See Top Children Query

QueryBuilder qb = topChildrenQuery(
        "blog_tag",                   
        termQuery("tag", "something") 
    )
    .score("max")                     
    .factor(5)                        
    .incrementalFactor(2);            

field

query

max, sum or avg

how many hits are asked for in the first child query run (defaults to 5)

if not enough parents are found, and there are still more child docs to query, then the child search hits are expanded by multiplying by the incremental_factor (defaults to 2).