File tree Expand file tree Collapse file tree 5 files changed +19
-4
lines changed
CodeGeneration/ApiGenerator/Configuration/Overrides/Endpoints
Elasticsearch.Net/Api/RequestParameters Expand file tree Collapse file tree 5 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ public class SearchOverrides : EndpointOverridesBase
1212 "timeout" ,
1313 "explain" ,
1414 "version" ,
15- "q" , //we dont support GET searches
1615 "sort" ,
1716 "_source" ,
1817 "_source_includes" ,
Original file line number Diff line number Diff line change @@ -1660,6 +1660,13 @@ public string Preference
16601660 set => Q ( "preference" , value ) ;
16611661 }
16621662
1663+ ///<summary>Query in the Lucene query string syntax</summary>
1664+ public string QueryOnQueryString
1665+ {
1666+ get => Q < string > ( "q" ) ;
1667+ set => Q ( "q" , value ) ;
1668+ }
1669+
16631670 ///<summary>Specify if request cache should be used for this request or not, defaults to index level setting</summary>
16641671 public bool ? RequestCache
16651672 {
Original file line number Diff line number Diff line change @@ -1278,6 +1278,8 @@ public SearchDescriptor<TInferDocument> Index<TOther>()
12781278 public SearchDescriptor < TInferDocument > PreFilterShardSize ( long ? prefiltershardsize ) => Qs ( "pre_filter_shard_size" , prefiltershardsize ) ;
12791279 ///<summary>Specify the node or shard the operation should be performed on (default: random)</summary>
12801280 public SearchDescriptor < TInferDocument > Preference ( string preference ) => Qs ( "preference" , preference ) ;
1281+ ///<summary>Query in the Lucene query string syntax</summary>
1282+ public SearchDescriptor < TInferDocument > QueryOnQueryString ( string queryonquerystring ) => Qs ( "q" , queryonquerystring ) ;
12811283 ///<summary>Specify if request cache should be used for this request or not, defaults to index level setting</summary>
12821284 public SearchDescriptor < TInferDocument > RequestCache ( bool ? requestcache = true ) => Qs ( "request_cache" , requestcache ) ;
12831285 ///<summary>
Original file line number Diff line number Diff line change @@ -2744,6 +2744,13 @@ public string Preference
27442744 set => Q ( "preference" , value ) ;
27452745 }
27462746
2747+ ///<summary>Query in the Lucene query string syntax</summary>
2748+ public string QueryOnQueryString
2749+ {
2750+ get => Q < string > ( "q" ) ;
2751+ set => Q ( "q" , value ) ;
2752+ }
2753+
27472754 ///<summary>Specify if request cache should be used for this request or not, defaults to index level setting</summary>
27482755 public bool ? RequestCache
27492756 {
Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ public partial interface ISearchRequest : ITypedSearchRequest
155155 /// </summary>
156156 [ DataMember ( Name = "track_scores" ) ]
157157 bool ? TrackScores { get ; set ; }
158-
158+
159159 /// <summary>
160160 /// Return a version for each search hit
161161 /// </summary>
@@ -224,7 +224,7 @@ public partial class SearchRequest
224224 public bool ? Version { get ; set ; }
225225
226226 protected override HttpMethod HttpMethod =>
227- RequestState . RequestParameters ? . ContainsQueryString ( "source" ) == true || RequestState . RequestParameters ? . ContainsQueryString ( "q" ) == true
227+ RequestState . RequestParameters ? . ContainsQueryString ( "source" ) == true
228228 ? HttpMethod . GET
229229 : HttpMethod . POST ;
230230
@@ -246,7 +246,7 @@ public partial class SearchRequest<TInferDocument> : ISearchRequest<TInferDocume
246246 public partial class SearchDescriptor < TInferDocument > where TInferDocument : class
247247 {
248248 protected override HttpMethod HttpMethod =>
249- RequestState . RequestParameters ? . ContainsQueryString ( "source" ) == true || RequestState . RequestParameters ? . ContainsQueryString ( "q" ) == true
249+ RequestState . RequestParameters ? . ContainsQueryString ( "source" ) == true
250250 ? HttpMethod . GET
251251 : HttpMethod . POST ;
252252
You can’t perform that action at this time.
0 commit comments