@@ -7,8 +7,8 @@ namespace Nest
7
7
[ JsonConverter ( typeof ( ReadAsTypeJsonConverter < HasParentQueryDescriptor < object > > ) ) ]
8
8
public interface IHasParentQuery : IQuery
9
9
{
10
- [ JsonProperty ( "type " ) ]
11
- TypeName Type { get ; set ; }
10
+ [ JsonProperty ( "parent_type " ) ]
11
+ TypeName ParentType { get ; set ; }
12
12
13
13
/// <summary>
14
14
/// 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
30
30
public class HasParentQuery : QueryBase , IHasParentQuery
31
31
{
32
32
protected override bool Conditionless => IsConditionless ( this ) ;
33
- public TypeName Type { get ; set ; }
33
+ public TypeName ParentType { get ; set ; }
34
34
35
35
/// <summary>
36
36
/// 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
42
42
public bool ? IgnoreUnmapped { get ; set ; }
43
43
44
44
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 ;
46
46
}
47
47
48
48
public class HasParentQueryDescriptor < T >
49
49
: QueryDescriptorBase < HasParentQueryDescriptor < T > , IHasParentQuery >
50
50
, IHasParentQuery where T : class
51
51
{
52
52
protected override bool Conditionless => HasParentQuery . IsConditionless ( this ) ;
53
- TypeName IHasParentQuery . Type { get ; set ; }
53
+ TypeName IHasParentQuery . ParentType { get ; set ; }
54
54
55
55
/// <summary>
56
56
/// 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>
61
61
QueryContainer IHasParentQuery . Query { get ; set ; }
62
62
bool ? IHasParentQuery . IgnoreUnmapped { get ; set ; }
63
63
64
- public HasParentQueryDescriptor ( ) { Self . Type = TypeName . Create < T > ( ) ; }
64
+ public HasParentQueryDescriptor ( ) { Self . ParentType = TypeName . Create < T > ( ) ; }
65
65
66
66
public HasParentQueryDescriptor < T > Query ( Func < QueryContainerDescriptor < T > , QueryContainer > selector ) =>
67
67
Assign ( a => a . Query = selector ? . Invoke ( new QueryContainerDescriptor < T > ( ) ) ) ;
68
68
69
- public HasParentQueryDescriptor < T > Type ( string type ) => Assign ( a => a . Type = type ) ;
69
+ public HasParentQueryDescriptor < T > ParentType ( string type ) => Assign ( a => a . ParentType = type ) ;
70
70
71
71
/// <summary>
72
72
/// Determines whether the score of the matching parent document is aggregated into the child documents belonging to the matching parent document.
0 commit comments