@@ -66,9 +66,14 @@ internal QueryDescriptor(bool forceConditionless)
6666 [ JsonConverter ( typeof ( DictionaryKeysAreNotPropertyNamesJsonConverter ) ) ]
6767 [ JsonProperty ( PropertyName = "fuzzy" ) ]
6868 internal IDictionary < PropertyPathMarker , object > FuzzyQueryDescriptor { get ; set ; }
69+ [ JsonProperty ( PropertyName = "geo_shape" ) ]
70+ [ JsonConverter ( typeof ( DictionaryKeysAreNotPropertyNamesJsonConverter ) ) ]
71+ internal IDictionary < PropertyPathMarker , object > GeoShapeQueryDescriptor { get ; set ; }
6972 [ JsonProperty ( PropertyName = "terms" ) ]
7073 [ JsonConverter ( typeof ( DictionaryKeysAreNotPropertyNamesJsonConverter ) ) ]
7174 internal IDictionary < PropertyPathMarker , object > TermsQueryDescriptor { get ; set ; }
75+ [ JsonProperty ( PropertyName = "simple_query_string" ) ]
76+ internal SimpleQueryStringQueryDescriptor < T > SimpleQueryStringDescriptor { get ; set ; }
7277 [ JsonProperty ( PropertyName = "query_string" ) ]
7378 internal QueryStringDescriptor < T > QueryStringDescriptor { get ; set ; }
7479 [ JsonProperty ( PropertyName = "regexp" ) ]
@@ -160,6 +165,20 @@ public BaseQuery QueryString(Action<QueryStringDescriptor<T>> selector)
160165 selector ( query ) ;
161166 return this . New ( query , q => q . QueryStringDescriptor = query ) ;
162167 }
168+
169+ /// <summary>
170+ /// A query that uses the SimpleQueryParser to parse its context.
171+ /// Unlike the regular query_string query, the simple_query_string query will
172+ /// never throw an exception, and discards invalid parts of the query.
173+ /// </summary>
174+ public BaseQuery SimpleQueryString ( Action < SimpleQueryStringQueryDescriptor < T > > selector )
175+ {
176+ var query = new SimpleQueryStringQueryDescriptor < T > ( ) ;
177+ selector ( query ) ;
178+ return this . New ( query , q => q . SimpleQueryStringDescriptor = query ) ;
179+ }
180+
181+
163182 /// <summary>
164183 /// A query that match on any (configurable) of the provided terms. This is a simpler syntax query for using a bool query with several term queries in the should clauses.
165184 /// </summary>
@@ -417,6 +436,23 @@ public BaseQuery MoreLikeThis(Action<MoreLikeThisQueryDescriptor<T>> selector)
417436
418437 return this . New ( query , q => q . MoreLikeThisDescriptor = query ) ;
419438 }
439+
440+ /// <summary>
441+ /// The geo_shape Filter uses the same grid square representation as the geo_shape mapping to find documents
442+ /// that have a shape that intersects with the query shape.
443+ /// It will also use the same PrefixTree configuration as defined for the field mapping.
444+ /// </summary>
445+ public BaseQuery GeoShape ( Action < GeoShapeQueryDescriptor < T > > selector )
446+ {
447+ var query = new GeoShapeQueryDescriptor < T > ( ) ;
448+ selector ( query ) ;
449+ var shape = new Dictionary < PropertyPathMarker , object >
450+ {
451+ { query . _Field , query }
452+ } ;
453+ return this . New ( query , q => q . GeoShapeQueryDescriptor = shape ) ;
454+ }
455+
420456 /// <summary>
421457 /// The has_child query works the same as the has_child filter, by automatically wrapping the filter with a
422458 /// constant_score.
@@ -493,6 +529,7 @@ public BaseQuery ConstantScore(Action<ConstantScoreQueryDescriptor<T>> selector)
493529 /// This can sometimes be desired since boost value set on specific queries gets normalized, while this
494530 /// query boost factor does not.
495531 /// </summary>
532+ [ Obsolete ( "Custom boost factor has been removed in 1.1" ) ]
496533 public BaseQuery CustomBoostFactor ( Action < CustomBoostFactorQueryDescriptor < T > > selector )
497534 {
498535 var query = new CustomBoostFactorQueryDescriptor < T > ( ) ;
@@ -504,6 +541,7 @@ public BaseQuery CustomBoostFactor(Action<CustomBoostFactorQueryDescriptor<T>> s
504541 /// custom_score query allows to wrap another query and customize the scoring of it optionally with a
505542 /// computation derived from other field values in the doc (numeric ones) using script expression
506543 /// </summary>
544+ [ Obsolete ( "Custom score has been removed in 1.1" ) ]
507545 public BaseQuery CustomScore ( Action < CustomScoreQueryDescriptor < T > > customScoreQuery )
508546 {
509547 var query = new CustomScoreQueryDescriptor < T > ( ) ;
0 commit comments