@@ -7,8 +7,8 @@ namespace Nest
77 [ JsonConverter ( typeof ( ReadAsTypeJsonConverter < HasParentQueryDescriptor < object > > ) ) ]
88 public interface IHasParentQuery : IQuery
99 {
10- [ JsonProperty ( "type " ) ]
11- TypeName Type { get ; set ; }
10+ [ JsonProperty ( "parent_type " ) ]
11+ TypeName ParentType { get ; set ; }
1212
1313 /// <summary>
1414 /// Determines whether the score of the matching parent document is aggregated into the child documents belonging to the matching parent document.
@@ -30,7 +30,7 @@ public interface IHasParentQuery : IQuery
3030 public class HasParentQuery : QueryBase , IHasParentQuery
3131 {
3232 protected override bool Conditionless => IsConditionless ( this ) ;
33- public TypeName Type { get ; set ; }
33+ public TypeName ParentType { get ; set ; }
3434
3535 /// <summary>
3636 /// Determines whether the score of the matching parent document is aggregated into the child documents belonging to the matching parent document.
@@ -42,15 +42,15 @@ public class HasParentQuery : QueryBase, IHasParentQuery
4242 public bool ? IgnoreUnmapped { get ; set ; }
4343
4444 internal override void InternalWrapInContainer ( IQueryContainer c ) => c . HasParent = this ;
45- internal static bool IsConditionless ( IHasParentQuery q ) => q . Query == null || q . Query . IsConditionless || q . Type == null ;
45+ internal static bool IsConditionless ( IHasParentQuery q ) => q . Query == null || q . Query . IsConditionless || q . ParentType == null ;
4646 }
4747
4848 public class HasParentQueryDescriptor < T >
4949 : QueryDescriptorBase < HasParentQueryDescriptor < T > , IHasParentQuery >
5050 , IHasParentQuery where T : class
5151 {
5252 protected override bool Conditionless => HasParentQuery . IsConditionless ( this ) ;
53- TypeName IHasParentQuery . Type { get ; set ; }
53+ TypeName IHasParentQuery . ParentType { get ; set ; }
5454
5555 /// <summary>
5656 /// Determines whether the score of the matching parent document is aggregated into the child documents belonging to the matching parent document.
@@ -61,12 +61,12 @@ public class HasParentQueryDescriptor<T>
6161 QueryContainer IHasParentQuery . Query { get ; set ; }
6262 bool ? IHasParentQuery . IgnoreUnmapped { get ; set ; }
6363
64- public HasParentQueryDescriptor ( ) { Self . Type = TypeName . Create < T > ( ) ; }
64+ public HasParentQueryDescriptor ( ) { Self . ParentType = TypeName . Create < T > ( ) ; }
6565
6666 public HasParentQueryDescriptor < T > Query ( Func < QueryContainerDescriptor < T > , QueryContainer > selector ) =>
6767 Assign ( a => a . Query = selector ? . Invoke ( new QueryContainerDescriptor < T > ( ) ) ) ;
6868
69- public HasParentQueryDescriptor < T > Type ( string type ) => Assign ( a => a . Type = type ) ;
69+ public HasParentQueryDescriptor < T > ParentType ( string type ) => Assign ( a => a . ParentType = type ) ;
7070
7171 /// <summary>
7272 /// Determines whether the score of the matching parent document is aggregated into the child documents belonging to the matching parent document.
0 commit comments