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 @@ -1638,6 +1638,13 @@ public string Preference
16381638 set => Q ( "preference" , value ) ;
16391639 }
16401640
1641+ ///<summary>Query in the Lucene query string syntax</summary>
1642+ public string QueryOnQueryString
1643+ {
1644+ get => Q < string > ( "q" ) ;
1645+ set => Q ( "q" , value ) ;
1646+ }
1647+
16411648 ///<summary>Specify if request cache should be used for this request or not, defaults to index level setting</summary>
16421649 public bool ? RequestCache
16431650 {
Original file line number Diff line number Diff line change @@ -1272,6 +1272,8 @@ public SearchDescriptor<TInferDocument> Index<TOther>()
12721272 public SearchDescriptor < TInferDocument > PreFilterShardSize ( long ? prefiltershardsize ) => Qs ( "pre_filter_shard_size" , prefiltershardsize ) ;
12731273 ///<summary>Specify the node or shard the operation should be performed on (default: random)</summary>
12741274 public SearchDescriptor < TInferDocument > Preference ( string preference ) => Qs ( "preference" , preference ) ;
1275+ ///<summary>Query in the Lucene query string syntax</summary>
1276+ public SearchDescriptor < TInferDocument > QueryOnQueryString ( string queryonquerystring ) => Qs ( "q" , queryonquerystring ) ;
12751277 ///<summary>Specify if request cache should be used for this request or not, defaults to index level setting</summary>
12761278 public SearchDescriptor < TInferDocument > RequestCache ( bool ? requestcache = true ) => Qs ( "request_cache" , requestcache ) ;
12771279 ///<summary>
Original file line number Diff line number Diff line change @@ -2743,6 +2743,13 @@ public string Preference
27432743 set => Q ( "preference" , value ) ;
27442744 }
27452745
2746+ ///<summary>Query in the Lucene query string syntax</summary>
2747+ public string QueryOnQueryString
2748+ {
2749+ get => Q < string > ( "q" ) ;
2750+ set => Q ( "q" , value ) ;
2751+ }
2752+
27462753 ///<summary>Specify if request cache should be used for this request or not, defaults to index level setting</summary>
27472754 public bool ? RequestCache
27482755 {
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