@@ -8,30 +8,33 @@ namespace Nest
88 [ JsonConverter ( typeof ( ReadAsTypeJsonConverter < SpanQueryDescriptor < object > > ) ) ]
99 public interface ISpanQuery : IQuery
1010 {
11- [ JsonProperty ( PropertyName = "span_term" ) ]
11+ [ JsonProperty ( "span_term" ) ]
1212 ISpanTermQuery SpanTerm { get ; set ; }
1313
14- [ JsonProperty ( PropertyName = "span_first" ) ]
14+ [ JsonProperty ( "span_first" ) ]
1515 ISpanFirstQuery SpanFirst { get ; set ; }
1616
17- [ JsonProperty ( PropertyName = "span_near" ) ]
17+ [ JsonProperty ( "span_near" ) ]
1818 ISpanNearQuery SpanNear { get ; set ; }
1919
20- [ JsonProperty ( PropertyName = "span_or" ) ]
20+ [ JsonProperty ( "span_or" ) ]
2121 ISpanOrQuery SpanOr { get ; set ; }
2222
23- [ JsonProperty ( PropertyName = "span_not" ) ]
23+ [ JsonProperty ( "span_not" ) ]
2424 ISpanNotQuery SpanNot { get ; set ; }
2525
26- [ JsonProperty ( PropertyName = "span_containing" ) ]
26+ [ JsonProperty ( "span_containing" ) ]
2727 ISpanContainingQuery SpanContaining { get ; set ; }
2828
29- [ JsonProperty ( PropertyName = "span_within" ) ]
29+ [ JsonProperty ( "span_within" ) ]
3030 ISpanWithinQuery SpanWithin { get ; set ; }
3131
32- [ JsonProperty ( PropertyName = "span_multi" ) ]
32+ [ JsonProperty ( "span_multi" ) ]
3333 ISpanMultiTermQuery SpanMultiTerm { get ; set ; }
3434
35+ [ JsonProperty ( "field_masking_span" ) ]
36+ ISpanFieldMaskingQuery SpanFieldMasking { get ; set ; }
37+
3538 void Accept ( IQueryVisitor visitor ) ;
3639 }
3740
@@ -52,6 +55,8 @@ public class SpanQuery : ISpanQuery
5255 public ISpanMultiTermQuery SpanMultiTerm { get ; set ; }
5356 public ISpanContainingQuery SpanContaining { get ; set ; }
5457 public ISpanWithinQuery SpanWithin { get ; set ; }
58+ public ISpanFieldMaskingQuery SpanFieldMasking { get ; set ; }
59+
5560 public void Accept ( IQueryVisitor visitor ) => new QueryWalker ( ) . Walk ( this , visitor ) ;
5661
5762 internal static bool IsConditionless ( ISpanQuery q ) => new [ ]
@@ -61,7 +66,8 @@ internal static bool IsConditionless(ISpanQuery q) => new[]
6166 q . SpanNear ,
6267 q . SpanOr ,
6368 q . SpanNot ,
64- q . SpanMultiTerm
69+ q . SpanMultiTerm ,
70+ q . SpanFieldMasking
6571 } . All ( sq => sq == null || sq . Conditionless ) ;
6672 }
6773
@@ -77,6 +83,7 @@ public class SpanQueryDescriptor<T> : QueryDescriptorBase<SpanQueryDescriptor<T>
7783 ISpanMultiTermQuery ISpanQuery . SpanMultiTerm { get ; set ; }
7884 ISpanContainingQuery ISpanQuery . SpanContaining { get ; set ; }
7985 ISpanWithinQuery ISpanQuery . SpanWithin { get ; set ; }
86+ ISpanFieldMaskingQuery ISpanQuery . SpanFieldMasking { get ; set ; }
8087
8188 public SpanQueryDescriptor < T > SpanTerm ( Func < SpanTermQueryDescriptor < T > , ISpanTermQuery > selector ) =>
8289 Assign ( a => a . SpanTerm = selector ? . Invoke ( new SpanTermQueryDescriptor < T > ( ) ) ) ;
@@ -102,6 +109,9 @@ public SpanQueryDescriptor<T> SpanContaining(Func<SpanContainingQueryDescriptor<
102109 public SpanQueryDescriptor < T > SpanWithin ( Func < SpanWithinQueryDescriptor < T > , ISpanWithinQuery > selector ) =>
103110 Assign ( a => a . SpanWithin = selector ? . Invoke ( new SpanWithinQueryDescriptor < T > ( ) ) ) ;
104111
112+ public SpanQueryDescriptor < T > SpanFieldMasking ( Func < SpanFieldMaskingQueryDescriptor < T > , ISpanFieldMaskingQuery > selector ) =>
113+ Assign ( a => a . SpanFieldMasking = selector ? . Invoke ( new SpanFieldMaskingQueryDescriptor < T > ( ) ) ) ;
114+
105115 void ISpanQuery . Accept ( IQueryVisitor visitor ) => new QueryWalker ( ) . Walk ( this , visitor ) ;
106116
107117 }
0 commit comments