A newer version is available. For the latest information, see the
current release documentation.
Has Child Query Usage
editHas Child Query Usage
editFluent DSL example
editq .HasChild<CommitActivity>(c => c .Name("named_query") .Boost(1.1) .InnerHits(i => i.Explain()) .MaxChildren(5) .MinChildren(1) .ScoreMode(ChildScoreMode.Average) .Query(qq => qq.MatchAll()) )
Object Initializer syntax example
editnew HasChildQuery { Name = "named_query", Boost = 1.1, Type = Infer.Relation<CommitActivity>(), InnerHits = new InnerHits { Explain = true }, MaxChildren = 5, MinChildren = 1, Query = new MatchAllQuery(), ScoreMode = ChildScoreMode.Average }
Example json output.
{ "has_child": { "_name": "named_query", "boost": 1.1, "type": "commits", "score_mode": "avg", "min_children": 1, "max_children": 5, "query": { "match_all": {} }, "inner_hits": { "explain": true } } }