You are looking at documentation for an older release.
Not what you want? See the
current release documentation.
Has Parent Query Usageedit
Fluent DSL Exampleedit
q .HasParent<Developer>(c => c .Name("named_query") .Boost(1.1) .InnerHits(i=>i.Explain()) .ScoreMode(ParentScoreMode.Score) .Query(qq=>qq.MatchAll()) )
Object Initializer Syntax Exampleedit
new HasParentQuery { Name = "named_query", Boost = 1.1, Type = Infer.Type<Developer>(), InnerHits = new InnerHits { Explain = true }, Query = new MatchAllQuery(), ScoreMode = ParentScoreMode.Score }
Example json output.
{ "has_parent": { "_name": "named_query", "boost": 1.1, "type": "developer", "score_mode": "score", "query": { "match_all": {} }, "inner_hits": { "explain": true } } }