-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathDescriptors.NoNamespace.cs
1720 lines (1610 loc) · 126 KB
/
Descriptors.NoNamespace.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
// -----------------------------------------------
//
// This file is automatically generated
// Please do not edit these files manually
// Run the following in the root of the repos:
//
// *NIX : ./build.sh codegen
// Windows : build.bat codegen
//
// -----------------------------------------------
// ReSharper disable RedundantUsingDirective
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;
// ReSharper disable RedundantBaseConstructorCall
// ReSharper disable UnusedTypeParameter
// ReSharper disable PartialMethodWithSinglePart
// ReSharper disable RedundantNameQualifier
namespace Nest
{
///<summary>Descriptor for Bulk <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html</para></summary>
public partial class BulkDescriptor : RequestDescriptorBase<BulkDescriptor, BulkRequestParameters, IBulkRequest>, IBulkRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceBulk;
///<summary>/_bulk</summary>
public BulkDescriptor(): base()
{
}
///<summary>/{index}/_bulk</summary>
///<param name = "index">Optional, accepts null</param>
public BulkDescriptor(IndexName index): base(r => r.Optional("index", index))
{
}
// values part of the url path
IndexName IBulkRequest.Index => Self.RouteValues.Get<IndexName>("index");
///<summary>Default index for items which don't provide one</summary>
public BulkDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public BulkDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (IndexName)v));
// Request parameters
///<summary>The pipeline id to preprocess incoming documents with</summary>
public BulkDescriptor Pipeline(string pipeline) => Qs("pipeline", pipeline);
///<summary>If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.</summary>
public BulkDescriptor Refresh(Refresh? refresh) => Qs("refresh", refresh);
///<summary>Sets require_alias for all incoming documents. Defaults to unset (false)</summary>
public BulkDescriptor RequireAlias(bool? requirealias = true) => Qs("require_alias", requirealias);
///<summary>
/// A document is routed to a particular shard in an index using the following formula
/// <para> shard_num = hash(_routing) % num_primary_shards</para>
/// <para>Elasticsearch will use the document id if not provided. </para>
/// <para>For requests that are constructed from/for a document NEST will automatically infer the routing key
/// if that document has a <see cref = "Nest.JoinField"/> or a routing mapping on for its type exists on <see cref = "Nest.ConnectionSettings"/></para>
///</summary>
public BulkDescriptor Routing(Routing routing) => Qs("routing", routing);
///<summary>Whether the _source should be included in the response.</summary>
public BulkDescriptor SourceEnabled(bool? sourceenabled = true) => Qs("_source", sourceenabled);
///<summary>Default list of fields to exclude from the returned _source field, can be overridden on each sub-request</summary>
public BulkDescriptor SourceExcludes(Fields sourceexcludes) => Qs("_source_excludes", sourceexcludes);
///<summary>Default list of fields to exclude from the returned _source field, can be overridden on each sub-request</summary>
public BulkDescriptor SourceExcludes<T>(params Expression<Func<T, object>>[] fields)
where T : class => Qs("_source_excludes", fields?.Select(e => (Field)e));
///<summary>Default list of fields to extract and return from the _source field, can be overridden on each sub-request</summary>
public BulkDescriptor SourceIncludes(Fields sourceincludes) => Qs("_source_includes", sourceincludes);
///<summary>Default list of fields to extract and return from the _source field, can be overridden on each sub-request</summary>
public BulkDescriptor SourceIncludes<T>(params Expression<Func<T, object>>[] fields)
where T : class => Qs("_source_includes", fields?.Select(e => (Field)e));
///<summary>Explicit operation timeout</summary>
public BulkDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
///<summary>Default document type for items which don't provide one</summary>
public BulkDescriptor TypeQueryString(string typequerystring) => Qs("type", typequerystring);
///<summary>Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)</summary>
public BulkDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards);
}
///<summary>Descriptor for ClearScroll <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-scroll-api.html</para></summary>
public partial class ClearScrollDescriptor : RequestDescriptorBase<ClearScrollDescriptor, ClearScrollRequestParameters, IClearScrollRequest>, IClearScrollRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceClearScroll;
// values part of the url path
// Request parameters
}
///<summary>Descriptor for ClosePointInTime <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/point-in-time-api.html</para></summary>
public partial class ClosePointInTimeDescriptor : RequestDescriptorBase<ClosePointInTimeDescriptor, ClosePointInTimeRequestParameters, IClosePointInTimeRequest>, IClosePointInTimeRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceClosePointInTime;
// values part of the url path
// Request parameters
}
///<summary>Descriptor for Count <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html</para></summary>
public partial class CountDescriptor<TDocument> : RequestDescriptorBase<CountDescriptor<TDocument>, CountRequestParameters, ICountRequest<TDocument>>, ICountRequest<TDocument>
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceCount;
///<summary>/{index}/_count</summary>
public CountDescriptor(): this(typeof(TDocument))
{
}
///<summary>/{index}/_count</summary>
///<param name = "index">Optional, accepts null</param>
public CountDescriptor(Indices index): base(r => r.Optional("index", index))
{
}
// values part of the url path
Indices ICountRequest.Index => Self.RouteValues.Get<Indices>("index");
///<summary>A comma-separated list of indices to restrict the results</summary>
public CountDescriptor<TDocument> Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public CountDescriptor<TDocument> Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public CountDescriptor<TDocument> AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)</summary>
public CountDescriptor<TDocument> AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
///<summary>Specify whether wildcard and prefix queries should be analyzed (default: false)</summary>
public CountDescriptor<TDocument> AnalyzeWildcard(bool? analyzewildcard = true) => Qs("analyze_wildcard", analyzewildcard);
///<summary>The analyzer to use for the query string</summary>
public CountDescriptor<TDocument> Analyzer(string analyzer) => Qs("analyzer", analyzer);
///<summary>The default operator for query string query (AND or OR)</summary>
public CountDescriptor<TDocument> DefaultOperator(DefaultOperator? defaultoperator) => Qs("default_operator", defaultoperator);
///<summary>The field to use as default where no field prefix is given in the query string</summary>
public CountDescriptor<TDocument> Df(string df) => Qs("df", df);
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public CountDescriptor<TDocument> ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///<summary>Whether specified concrete, expanded or aliased indices should be ignored when throttled</summary>
public CountDescriptor<TDocument> IgnoreThrottled(bool? ignorethrottled = true) => Qs("ignore_throttled", ignorethrottled);
///<summary>Whether specified concrete indices should be ignored when unavailable (missing or closed)</summary>
public CountDescriptor<TDocument> IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///<summary>Specify whether format-based query failures (such as providing text to a numeric field) should be ignored</summary>
public CountDescriptor<TDocument> Lenient(bool? lenient = true) => Qs("lenient", lenient);
///<summary>Include only documents with a specific `_score` value in the result</summary>
public CountDescriptor<TDocument> MinScore(double? minscore) => Qs("min_score", minscore);
///<summary>Specify the node or shard the operation should be performed on (default: random)</summary>
public CountDescriptor<TDocument> Preference(string preference) => Qs("preference", preference);
///<summary>Query in the Lucene query string syntax</summary>
public CountDescriptor<TDocument> QueryOnQueryString(string queryonquerystring) => Qs("q", queryonquerystring);
///<summary>
/// A document is routed to a particular shard in an index using the following formula
/// <para> shard_num = hash(_routing) % num_primary_shards</para>
/// <para>Elasticsearch will use the document id if not provided. </para>
/// <para>For requests that are constructed from/for a document NEST will automatically infer the routing key
/// if that document has a <see cref = "Nest.JoinField"/> or a routing mapping on for its type exists on <see cref = "Nest.ConnectionSettings"/></para>
///</summary>
public CountDescriptor<TDocument> Routing(Routing routing) => Qs("routing", routing);
///<summary>The maximum count for each shard, upon reaching which the query execution will terminate early</summary>
public CountDescriptor<TDocument> TerminateAfter(long? terminateafter) => Qs("terminate_after", terminateafter);
}
///<summary>Descriptor for Create <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html</para></summary>
public partial class CreateDescriptor<TDocument> : RequestDescriptorBase<CreateDescriptor<TDocument>, CreateRequestParameters, ICreateRequest<TDocument>>, ICreateRequest<TDocument>
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceCreate;
///<summary>/{index}/_create/{id}</summary>
///<param name = "index">this parameter is required</param>
///<param name = "id">this parameter is required</param>
public CreateDescriptor(IndexName index, Id id): base(r => r.Required("index", index).Required("id", id))
{
}
///<summary>/{index}/_create/{id}</summary>
///<param name = "id">this parameter is required</param>
public CreateDescriptor(Id id): this(typeof(TDocument), id)
{
}
///<summary>/{index}/_create/{id}</summary>
///<param name = "id">The document used to resolve the path from</param>
public CreateDescriptor(TDocument documentWithId, IndexName index = null, Id id = null): this(index ?? typeof(TDocument), id ?? Nest.Id.From(documentWithId)) => DocumentFromPath(documentWithId);
partial void DocumentFromPath(TDocument document);
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected CreateDescriptor(): base()
{
}
// values part of the url path
IndexName ICreateRequest<TDocument>.Index => Self.RouteValues.Get<IndexName>("index");
Id ICreateRequest<TDocument>.Id => Self.RouteValues.Get<Id>("id");
///<summary>The name of the index</summary>
public CreateDescriptor<TDocument> Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public CreateDescriptor<TDocument> Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v));
// Request parameters
///<summary>The pipeline id to preprocess incoming documents with</summary>
public CreateDescriptor<TDocument> Pipeline(string pipeline) => Qs("pipeline", pipeline);
///<summary>If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.</summary>
public CreateDescriptor<TDocument> Refresh(Refresh? refresh) => Qs("refresh", refresh);
///<summary>
/// A document is routed to a particular shard in an index using the following formula
/// <para> shard_num = hash(_routing) % num_primary_shards</para>
/// <para>Elasticsearch will use the document id if not provided. </para>
/// <para>For requests that are constructed from/for a document NEST will automatically infer the routing key
/// if that document has a <see cref = "Nest.JoinField"/> or a routing mapping on for its type exists on <see cref = "Nest.ConnectionSettings"/></para>
///</summary>
public CreateDescriptor<TDocument> Routing(Routing routing) => Qs("routing", routing);
///<summary>Explicit operation timeout</summary>
public CreateDescriptor<TDocument> Timeout(Time timeout) => Qs("timeout", timeout);
///<summary>Explicit version number for concurrency control</summary>
public CreateDescriptor<TDocument> Version(long? version) => Qs("version", version);
///<summary>Specific version type</summary>
public CreateDescriptor<TDocument> VersionType(VersionType? versiontype) => Qs("version_type", versiontype);
///<summary>Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)</summary>
public CreateDescriptor<TDocument> WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards);
}
///<summary>Descriptor for Delete <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html</para></summary>
public partial class DeleteDescriptor<TDocument> : RequestDescriptorBase<DeleteDescriptor<TDocument>, DeleteRequestParameters, IDeleteRequest<TDocument>>, IDeleteRequest<TDocument>
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceDelete;
///<summary>/{index}/_doc/{id}</summary>
///<param name = "index">this parameter is required</param>
///<param name = "id">this parameter is required</param>
public DeleteDescriptor(IndexName index, Id id): base(r => r.Required("index", index).Required("id", id))
{
}
///<summary>/{index}/_doc/{id}</summary>
///<param name = "id">this parameter is required</param>
public DeleteDescriptor(Id id): this(typeof(TDocument), id)
{
}
///<summary>/{index}/_doc/{id}</summary>
///<param name = "id">The document used to resolve the path from</param>
public DeleteDescriptor(TDocument documentWithId, IndexName index = null, Id id = null): this(index ?? typeof(TDocument), id ?? Nest.Id.From(documentWithId)) => DocumentFromPath(documentWithId);
partial void DocumentFromPath(TDocument document);
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected DeleteDescriptor(): base()
{
}
// values part of the url path
IndexName IDeleteRequest.Index => Self.RouteValues.Get<IndexName>("index");
Id IDeleteRequest.Id => Self.RouteValues.Get<Id>("id");
///<summary>The name of the index</summary>
public DeleteDescriptor<TDocument> Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public DeleteDescriptor<TDocument> Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v));
// Request parameters
///<summary>only perform the delete operation if the last operation that has changed the document has the specified primary term</summary>
public DeleteDescriptor<TDocument> IfPrimaryTerm(long? ifprimaryterm) => Qs("if_primary_term", ifprimaryterm);
///<summary>only perform the delete operation if the last operation that has changed the document has the specified sequence number</summary>
public DeleteDescriptor<TDocument> IfSequenceNumber(long? ifsequencenumber) => Qs("if_seq_no", ifsequencenumber);
///<summary>If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.</summary>
public DeleteDescriptor<TDocument> Refresh(Refresh? refresh) => Qs("refresh", refresh);
///<summary>
/// A document is routed to a particular shard in an index using the following formula
/// <para> shard_num = hash(_routing) % num_primary_shards</para>
/// <para>Elasticsearch will use the document id if not provided. </para>
/// <para>For requests that are constructed from/for a document NEST will automatically infer the routing key
/// if that document has a <see cref = "Nest.JoinField"/> or a routing mapping on for its type exists on <see cref = "Nest.ConnectionSettings"/></para>
///</summary>
public DeleteDescriptor<TDocument> Routing(Routing routing) => Qs("routing", routing);
///<summary>Explicit operation timeout</summary>
public DeleteDescriptor<TDocument> Timeout(Time timeout) => Qs("timeout", timeout);
///<summary>Explicit version number for concurrency control</summary>
public DeleteDescriptor<TDocument> Version(long? version) => Qs("version", version);
///<summary>Specific version type</summary>
public DeleteDescriptor<TDocument> VersionType(VersionType? versiontype) => Qs("version_type", versiontype);
///<summary>Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)</summary>
public DeleteDescriptor<TDocument> WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards);
}
///<summary>Descriptor for DeleteByQuery <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html</para></summary>
public partial class DeleteByQueryDescriptor<TDocument> : RequestDescriptorBase<DeleteByQueryDescriptor<TDocument>, DeleteByQueryRequestParameters, IDeleteByQueryRequest<TDocument>>, IDeleteByQueryRequest<TDocument>
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceDeleteByQuery;
///<summary>/{index}/_delete_by_query</summary>
///<param name = "index">this parameter is required</param>
public DeleteByQueryDescriptor(Indices index): base(r => r.Required("index", index))
{
}
///<summary>/{index}/_delete_by_query</summary>
public DeleteByQueryDescriptor(): this(typeof(TDocument))
{
}
// values part of the url path
Indices IDeleteByQueryRequest.Index => Self.RouteValues.Get<Indices>("index");
///<summary>A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices</summary>
public DeleteByQueryDescriptor<TDocument> Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public DeleteByQueryDescriptor<TDocument> Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public DeleteByQueryDescriptor<TDocument> AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)</summary>
public DeleteByQueryDescriptor<TDocument> AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
///<summary>Specify whether wildcard and prefix queries should be analyzed (default: false)</summary>
public DeleteByQueryDescriptor<TDocument> AnalyzeWildcard(bool? analyzewildcard = true) => Qs("analyze_wildcard", analyzewildcard);
///<summary>The analyzer to use for the query string</summary>
public DeleteByQueryDescriptor<TDocument> Analyzer(string analyzer) => Qs("analyzer", analyzer);
///<summary>What to do when the delete by query hits version conflicts?</summary>
public DeleteByQueryDescriptor<TDocument> Conflicts(Conflicts? conflicts) => Qs("conflicts", conflicts);
///<summary>The default operator for query string query (AND or OR)</summary>
public DeleteByQueryDescriptor<TDocument> DefaultOperator(DefaultOperator? defaultoperator) => Qs("default_operator", defaultoperator);
///<summary>The field to use as default where no field prefix is given in the query string</summary>
public DeleteByQueryDescriptor<TDocument> Df(string df) => Qs("df", df);
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public DeleteByQueryDescriptor<TDocument> ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///<summary>Starting offset (default: 0)</summary>
public DeleteByQueryDescriptor<TDocument> From(long? from) => Qs("from", from);
///<summary>Whether specified concrete indices should be ignored when unavailable (missing or closed)</summary>
public DeleteByQueryDescriptor<TDocument> IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///<summary>Specify whether format-based query failures (such as providing text to a numeric field) should be ignored</summary>
public DeleteByQueryDescriptor<TDocument> Lenient(bool? lenient = true) => Qs("lenient", lenient);
///<summary>Specify the node or shard the operation should be performed on (default: random)</summary>
public DeleteByQueryDescriptor<TDocument> Preference(string preference) => Qs("preference", preference);
///<summary>Query in the Lucene query string syntax</summary>
public DeleteByQueryDescriptor<TDocument> QueryOnQueryString(string queryonquerystring) => Qs("q", queryonquerystring);
///<summary>Should the effected indexes be refreshed?</summary>
public DeleteByQueryDescriptor<TDocument> Refresh(bool? refresh = true) => Qs("refresh", refresh);
///<summary>Specify if request cache should be used for this request or not, defaults to index level setting</summary>
public DeleteByQueryDescriptor<TDocument> RequestCache(bool? requestcache = true) => Qs("request_cache", requestcache);
///<summary>The throttle for this request in sub-requests per second. -1 means no throttle.</summary>
public DeleteByQueryDescriptor<TDocument> RequestsPerSecond(long? requestspersecond) => Qs("requests_per_second", requestspersecond);
///<summary>
/// A document is routed to a particular shard in an index using the following formula
/// <para> shard_num = hash(_routing) % num_primary_shards</para>
/// <para>Elasticsearch will use the document id if not provided. </para>
/// <para>For requests that are constructed from/for a document NEST will automatically infer the routing key
/// if that document has a <see cref = "Nest.JoinField"/> or a routing mapping on for its type exists on <see cref = "Nest.ConnectionSettings"/></para>
///</summary>
public DeleteByQueryDescriptor<TDocument> Routing(Routing routing) => Qs("routing", routing);
///<summary>Specify how long a consistent view of the index should be maintained for scrolled search</summary>
public DeleteByQueryDescriptor<TDocument> Scroll(Time scroll) => Qs("scroll", scroll);
///<summary>Size on the scroll request powering the delete by query</summary>
public DeleteByQueryDescriptor<TDocument> ScrollSize(long? scrollsize) => Qs("scroll_size", scrollsize);
///<summary>Explicit timeout for each search request. Defaults to no timeout.</summary>
public DeleteByQueryDescriptor<TDocument> SearchTimeout(Time searchtimeout) => Qs("search_timeout", searchtimeout);
///<summary>Search operation type</summary>
public DeleteByQueryDescriptor<TDocument> SearchType(SearchType? searchtype) => Qs("search_type", searchtype);
///<summary>Deprecated, please use `max_docs` instead</summary>
public DeleteByQueryDescriptor<TDocument> Size(long? size) => Qs("size", size);
///<summary>The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks.</summary>
public DeleteByQueryDescriptor<TDocument> Slices(long? slices) => Qs("slices", slices);
///<summary>A comma-separated list of <field>:<direction> pairs</summary>
public DeleteByQueryDescriptor<TDocument> Sort(params string[] sort) => Qs("sort", sort);
///<summary>Specific 'tag' of the request for logging and statistical purposes</summary>
public DeleteByQueryDescriptor<TDocument> Stats(params string[] stats) => Qs("stats", stats);
///<summary>The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.</summary>
public DeleteByQueryDescriptor<TDocument> TerminateAfter(long? terminateafter) => Qs("terminate_after", terminateafter);
///<summary>Time each individual bulk request should wait for shards that are unavailable.</summary>
public DeleteByQueryDescriptor<TDocument> Timeout(Time timeout) => Qs("timeout", timeout);
///<summary>Specify whether to return document version as part of a hit</summary>
public DeleteByQueryDescriptor<TDocument> Version(bool? version = true) => Qs("version", version);
///<summary>Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)</summary>
public DeleteByQueryDescriptor<TDocument> WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards);
///<summary>Should the request should block until the delete by query is complete.</summary>
public DeleteByQueryDescriptor<TDocument> WaitForCompletion(bool? waitforcompletion = true) => Qs("wait_for_completion", waitforcompletion);
}
///<summary>Descriptor for DeleteByQueryRethrottle <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html</para></summary>
public partial class DeleteByQueryRethrottleDescriptor : RequestDescriptorBase<DeleteByQueryRethrottleDescriptor, DeleteByQueryRethrottleRequestParameters, IDeleteByQueryRethrottleRequest>, IDeleteByQueryRethrottleRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceDeleteByQueryRethrottle;
///<summary>/_delete_by_query/{task_id}/_rethrottle</summary>
///<param name = "taskId">this parameter is required</param>
public DeleteByQueryRethrottleDescriptor(TaskId taskId): base(r => r.Required("task_id", taskId))
{
}
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected DeleteByQueryRethrottleDescriptor(): base()
{
}
// values part of the url path
TaskId IDeleteByQueryRethrottleRequest.TaskId => Self.RouteValues.Get<TaskId>("task_id");
// Request parameters
///<summary>The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.</summary>
public DeleteByQueryRethrottleDescriptor RequestsPerSecond(long? requestspersecond) => Qs("requests_per_second", requestspersecond);
}
///<summary>Descriptor for DeleteScript <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html</para></summary>
public partial class DeleteScriptDescriptor : RequestDescriptorBase<DeleteScriptDescriptor, DeleteScriptRequestParameters, IDeleteScriptRequest>, IDeleteScriptRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceDeleteScript;
///<summary>/_scripts/{id}</summary>
///<param name = "id">this parameter is required</param>
public DeleteScriptDescriptor(Id id): base(r => r.Required("id", id))
{
}
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected DeleteScriptDescriptor(): base()
{
}
// values part of the url path
Id IDeleteScriptRequest.Id => Self.RouteValues.Get<Id>("id");
// Request parameters
///<summary>Specify timeout for connection to master</summary>
public DeleteScriptDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
///<summary>Explicit operation timeout</summary>
public DeleteScriptDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
}
///<summary>Descriptor for DocumentExists <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html</para></summary>
public partial class DocumentExistsDescriptor<TDocument> : RequestDescriptorBase<DocumentExistsDescriptor<TDocument>, DocumentExistsRequestParameters, IDocumentExistsRequest<TDocument>>, IDocumentExistsRequest<TDocument>
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceDocumentExists;
///<summary>/{index}/_doc/{id}</summary>
///<param name = "index">this parameter is required</param>
///<param name = "id">this parameter is required</param>
public DocumentExistsDescriptor(IndexName index, Id id): base(r => r.Required("index", index).Required("id", id))
{
}
///<summary>/{index}/_doc/{id}</summary>
///<param name = "id">this parameter is required</param>
public DocumentExistsDescriptor(Id id): this(typeof(TDocument), id)
{
}
///<summary>/{index}/_doc/{id}</summary>
///<param name = "id">The document used to resolve the path from</param>
public DocumentExistsDescriptor(TDocument documentWithId, IndexName index = null, Id id = null): this(index ?? typeof(TDocument), id ?? Nest.Id.From(documentWithId)) => DocumentFromPath(documentWithId);
partial void DocumentFromPath(TDocument document);
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected DocumentExistsDescriptor(): base()
{
}
// values part of the url path
IndexName IDocumentExistsRequest.Index => Self.RouteValues.Get<IndexName>("index");
Id IDocumentExistsRequest.Id => Self.RouteValues.Get<Id>("id");
///<summary>The name of the index</summary>
public DocumentExistsDescriptor<TDocument> Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public DocumentExistsDescriptor<TDocument> Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v));
// Request parameters
///<summary>Specify the node or shard the operation should be performed on (default: random)</summary>
public DocumentExistsDescriptor<TDocument> Preference(string preference) => Qs("preference", preference);
///<summary>Specify whether to perform the operation in realtime or search mode</summary>
public DocumentExistsDescriptor<TDocument> Realtime(bool? realtime = true) => Qs("realtime", realtime);
///<summary>Refresh the shard containing the document before performing the operation</summary>
public DocumentExistsDescriptor<TDocument> Refresh(bool? refresh = true) => Qs("refresh", refresh);
///<summary>
/// A document is routed to a particular shard in an index using the following formula
/// <para> shard_num = hash(_routing) % num_primary_shards</para>
/// <para>Elasticsearch will use the document id if not provided. </para>
/// <para>For requests that are constructed from/for a document NEST will automatically infer the routing key
/// if that document has a <see cref = "Nest.JoinField"/> or a routing mapping on for its type exists on <see cref = "Nest.ConnectionSettings"/></para>
///</summary>
public DocumentExistsDescriptor<TDocument> Routing(Routing routing) => Qs("routing", routing);
///<summary>Whether the _source should be included in the response.</summary>
public DocumentExistsDescriptor<TDocument> SourceEnabled(bool? sourceenabled = true) => Qs("_source", sourceenabled);
///<summary>A list of fields to exclude from the returned _source field</summary>
public DocumentExistsDescriptor<TDocument> SourceExcludes(Fields sourceexcludes) => Qs("_source_excludes", sourceexcludes);
///<summary>A list of fields to exclude from the returned _source field</summary>
public DocumentExistsDescriptor<TDocument> SourceExcludes(params Expression<Func<TDocument, object>>[] fields) => Qs("_source_excludes", fields?.Select(e => (Field)e));
///<summary>A list of fields to extract and return from the _source field</summary>
public DocumentExistsDescriptor<TDocument> SourceIncludes(Fields sourceincludes) => Qs("_source_includes", sourceincludes);
///<summary>A list of fields to extract and return from the _source field</summary>
public DocumentExistsDescriptor<TDocument> SourceIncludes(params Expression<Func<TDocument, object>>[] fields) => Qs("_source_includes", fields?.Select(e => (Field)e));
///<summary>A comma-separated list of stored fields to return in the response</summary>
public DocumentExistsDescriptor<TDocument> StoredFields(Fields storedfields) => Qs("stored_fields", storedfields);
///<summary>A comma-separated list of stored fields to return in the response</summary>
public DocumentExistsDescriptor<TDocument> StoredFields(params Expression<Func<TDocument, object>>[] fields) => Qs("stored_fields", fields?.Select(e => (Field)e));
///<summary>Explicit version number for concurrency control</summary>
public DocumentExistsDescriptor<TDocument> Version(long? version) => Qs("version", version);
///<summary>Specific version type</summary>
public DocumentExistsDescriptor<TDocument> VersionType(VersionType? versiontype) => Qs("version_type", versiontype);
}
///<summary>Descriptor for SourceExists <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html</para></summary>
public partial class SourceExistsDescriptor<TDocument> : RequestDescriptorBase<SourceExistsDescriptor<TDocument>, SourceExistsRequestParameters, ISourceExistsRequest<TDocument>>, ISourceExistsRequest<TDocument>
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceSourceExists;
///<summary>/{index}/_source/{id}</summary>
///<param name = "index">this parameter is required</param>
///<param name = "id">this parameter is required</param>
public SourceExistsDescriptor(IndexName index, Id id): base(r => r.Required("index", index).Required("id", id))
{
}
///<summary>/{index}/_source/{id}</summary>
///<param name = "id">this parameter is required</param>
public SourceExistsDescriptor(Id id): this(typeof(TDocument), id)
{
}
///<summary>/{index}/_source/{id}</summary>
///<param name = "id">The document used to resolve the path from</param>
public SourceExistsDescriptor(TDocument documentWithId, IndexName index = null, Id id = null): this(index ?? typeof(TDocument), id ?? Nest.Id.From(documentWithId)) => DocumentFromPath(documentWithId);
partial void DocumentFromPath(TDocument document);
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected SourceExistsDescriptor(): base()
{
}
// values part of the url path
IndexName ISourceExistsRequest.Index => Self.RouteValues.Get<IndexName>("index");
Id ISourceExistsRequest.Id => Self.RouteValues.Get<Id>("id");
///<summary>The name of the index</summary>
public SourceExistsDescriptor<TDocument> Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public SourceExistsDescriptor<TDocument> Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v));
// Request parameters
///<summary>Specify the node or shard the operation should be performed on (default: random)</summary>
public SourceExistsDescriptor<TDocument> Preference(string preference) => Qs("preference", preference);
///<summary>Specify whether to perform the operation in realtime or search mode</summary>
public SourceExistsDescriptor<TDocument> Realtime(bool? realtime = true) => Qs("realtime", realtime);
///<summary>Refresh the shard containing the document before performing the operation</summary>
public SourceExistsDescriptor<TDocument> Refresh(bool? refresh = true) => Qs("refresh", refresh);
///<summary>
/// A document is routed to a particular shard in an index using the following formula
/// <para> shard_num = hash(_routing) % num_primary_shards</para>
/// <para>Elasticsearch will use the document id if not provided. </para>
/// <para>For requests that are constructed from/for a document NEST will automatically infer the routing key
/// if that document has a <see cref = "Nest.JoinField"/> or a routing mapping on for its type exists on <see cref = "Nest.ConnectionSettings"/></para>
///</summary>
public SourceExistsDescriptor<TDocument> Routing(Routing routing) => Qs("routing", routing);
///<summary>Whether the _source should be included in the response.</summary>
public SourceExistsDescriptor<TDocument> SourceEnabled(bool? sourceenabled = true) => Qs("_source", sourceenabled);
///<summary>A list of fields to exclude from the returned _source field</summary>
public SourceExistsDescriptor<TDocument> SourceExcludes(Fields sourceexcludes) => Qs("_source_excludes", sourceexcludes);
///<summary>A list of fields to exclude from the returned _source field</summary>
public SourceExistsDescriptor<TDocument> SourceExcludes(params Expression<Func<TDocument, object>>[] fields) => Qs("_source_excludes", fields?.Select(e => (Field)e));
///<summary>A list of fields to extract and return from the _source field</summary>
public SourceExistsDescriptor<TDocument> SourceIncludes(Fields sourceincludes) => Qs("_source_includes", sourceincludes);
///<summary>A list of fields to extract and return from the _source field</summary>
public SourceExistsDescriptor<TDocument> SourceIncludes(params Expression<Func<TDocument, object>>[] fields) => Qs("_source_includes", fields?.Select(e => (Field)e));
///<summary>Explicit version number for concurrency control</summary>
public SourceExistsDescriptor<TDocument> Version(long? version) => Qs("version", version);
///<summary>Specific version type</summary>
public SourceExistsDescriptor<TDocument> VersionType(VersionType? versiontype) => Qs("version_type", versiontype);
}
///<summary>Descriptor for Explain <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html</para></summary>
public partial class ExplainDescriptor<TDocument> : RequestDescriptorBase<ExplainDescriptor<TDocument>, ExplainRequestParameters, IExplainRequest<TDocument>>, IExplainRequest<TDocument>
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceExplain;
///<summary>/{index}/_explain/{id}</summary>
///<param name = "index">this parameter is required</param>
///<param name = "id">this parameter is required</param>
public ExplainDescriptor(IndexName index, Id id): base(r => r.Required("index", index).Required("id", id))
{
}
///<summary>/{index}/_explain/{id}</summary>
///<param name = "id">this parameter is required</param>
public ExplainDescriptor(Id id): this(typeof(TDocument), id)
{
}
///<summary>/{index}/_explain/{id}</summary>
///<param name = "id">The document used to resolve the path from</param>
public ExplainDescriptor(TDocument documentWithId, IndexName index = null, Id id = null): this(index ?? typeof(TDocument), id ?? Nest.Id.From(documentWithId)) => DocumentFromPath(documentWithId);
partial void DocumentFromPath(TDocument document);
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected ExplainDescriptor(): base()
{
}
// values part of the url path
IndexName IExplainRequest.Index => Self.RouteValues.Get<IndexName>("index");
Id IExplainRequest.Id => Self.RouteValues.Get<Id>("id");
///<summary>The name of the index</summary>
public ExplainDescriptor<TDocument> Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public ExplainDescriptor<TDocument> Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v));
// Request parameters
///<summary>Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)</summary>
public ExplainDescriptor<TDocument> AnalyzeWildcard(bool? analyzewildcard = true) => Qs("analyze_wildcard", analyzewildcard);
///<summary>The analyzer for the query string query</summary>
public ExplainDescriptor<TDocument> Analyzer(string analyzer) => Qs("analyzer", analyzer);
///<summary>The default operator for query string query (AND or OR)</summary>
public ExplainDescriptor<TDocument> DefaultOperator(DefaultOperator? defaultoperator) => Qs("default_operator", defaultoperator);
///<summary>The default field for query string query (default: _all)</summary>
public ExplainDescriptor<TDocument> Df(string df) => Qs("df", df);
///<summary>Specify whether format-based query failures (such as providing text to a numeric field) should be ignored</summary>
public ExplainDescriptor<TDocument> Lenient(bool? lenient = true) => Qs("lenient", lenient);
///<summary>Specify the node or shard the operation should be performed on (default: random)</summary>
public ExplainDescriptor<TDocument> Preference(string preference) => Qs("preference", preference);
///<summary>Query in the Lucene query string syntax</summary>
public ExplainDescriptor<TDocument> QueryOnQueryString(string queryonquerystring) => Qs("q", queryonquerystring);
///<summary>
/// A document is routed to a particular shard in an index using the following formula
/// <para> shard_num = hash(_routing) % num_primary_shards</para>
/// <para>Elasticsearch will use the document id if not provided. </para>
/// <para>For requests that are constructed from/for a document NEST will automatically infer the routing key
/// if that document has a <see cref = "Nest.JoinField"/> or a routing mapping on for its type exists on <see cref = "Nest.ConnectionSettings"/></para>
///</summary>
public ExplainDescriptor<TDocument> Routing(Routing routing) => Qs("routing", routing);
///<summary>Whether the _source should be included in the response.</summary>
public ExplainDescriptor<TDocument> SourceEnabled(bool? sourceenabled = true) => Qs("_source", sourceenabled);
///<summary>A list of fields to exclude from the returned _source field</summary>
public ExplainDescriptor<TDocument> SourceExcludes(Fields sourceexcludes) => Qs("_source_excludes", sourceexcludes);
///<summary>A list of fields to exclude from the returned _source field</summary>
public ExplainDescriptor<TDocument> SourceExcludes(params Expression<Func<TDocument, object>>[] fields) => Qs("_source_excludes", fields?.Select(e => (Field)e));
///<summary>A list of fields to extract and return from the _source field</summary>
public ExplainDescriptor<TDocument> SourceIncludes(Fields sourceincludes) => Qs("_source_includes", sourceincludes);
///<summary>A list of fields to extract and return from the _source field</summary>
public ExplainDescriptor<TDocument> SourceIncludes(params Expression<Func<TDocument, object>>[] fields) => Qs("_source_includes", fields?.Select(e => (Field)e));
}
///<summary>Descriptor for FieldCapabilities <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html</para></summary>
public partial class FieldCapabilitiesDescriptor : RequestDescriptorBase<FieldCapabilitiesDescriptor, FieldCapabilitiesRequestParameters, IFieldCapabilitiesRequest>, IFieldCapabilitiesRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceFieldCapabilities;
///<summary>/_field_caps</summary>
public FieldCapabilitiesDescriptor(): base()
{
}
///<summary>/{index}/_field_caps</summary>
///<param name = "index">Optional, accepts null</param>
public FieldCapabilitiesDescriptor(Indices index): base(r => r.Optional("index", index))
{
}
// values part of the url path
Indices IFieldCapabilitiesRequest.Index => Self.RouteValues.Get<Indices>("index");
///<summary>A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices</summary>
public FieldCapabilitiesDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public FieldCapabilitiesDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public FieldCapabilitiesDescriptor AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)</summary>
public FieldCapabilitiesDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public FieldCapabilitiesDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
///<summary>A comma-separated list of field names</summary>
public FieldCapabilitiesDescriptor Fields(Fields fields) => Qs("fields", fields);
///<summary>A comma-separated list of field names</summary>
public FieldCapabilitiesDescriptor Fields<T>(params Expression<Func<T, object>>[] fields)
where T : class => Qs("fields", fields?.Select(e => (Field)e));
///<summary>Whether specified concrete indices should be ignored when unavailable (missing or closed)</summary>
public FieldCapabilitiesDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
///<summary>Indicates whether unmapped fields should be included in the response.</summary>
public FieldCapabilitiesDescriptor IncludeUnmapped(bool? includeunmapped = true) => Qs("include_unmapped", includeunmapped);
}
///<summary>Descriptor for Get <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html</para></summary>
public partial class GetDescriptor<TDocument> : RequestDescriptorBase<GetDescriptor<TDocument>, GetRequestParameters, IGetRequest<TDocument>>, IGetRequest<TDocument>
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceGet;
///<summary>/{index}/_doc/{id}</summary>
///<param name = "index">this parameter is required</param>
///<param name = "id">this parameter is required</param>
public GetDescriptor(IndexName index, Id id): base(r => r.Required("index", index).Required("id", id))
{
}
///<summary>/{index}/_doc/{id}</summary>
///<param name = "id">this parameter is required</param>
public GetDescriptor(Id id): this(typeof(TDocument), id)
{
}
///<summary>/{index}/_doc/{id}</summary>
///<param name = "id">The document used to resolve the path from</param>
public GetDescriptor(TDocument documentWithId, IndexName index = null, Id id = null): this(index ?? typeof(TDocument), id ?? Nest.Id.From(documentWithId)) => DocumentFromPath(documentWithId);
partial void DocumentFromPath(TDocument document);
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected GetDescriptor(): base()
{
}
// values part of the url path
IndexName IGetRequest.Index => Self.RouteValues.Get<IndexName>("index");
Id IGetRequest.Id => Self.RouteValues.Get<Id>("id");
///<summary>The name of the index</summary>
public GetDescriptor<TDocument> Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public GetDescriptor<TDocument> Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v));
// Request parameters
///<summary>Specify the node or shard the operation should be performed on (default: random)</summary>
public GetDescriptor<TDocument> Preference(string preference) => Qs("preference", preference);
///<summary>Specify whether to perform the operation in realtime or search mode</summary>
public GetDescriptor<TDocument> Realtime(bool? realtime = true) => Qs("realtime", realtime);
///<summary>Refresh the shard containing the document before performing the operation</summary>
public GetDescriptor<TDocument> Refresh(bool? refresh = true) => Qs("refresh", refresh);
///<summary>
/// A document is routed to a particular shard in an index using the following formula
/// <para> shard_num = hash(_routing) % num_primary_shards</para>
/// <para>Elasticsearch will use the document id if not provided. </para>
/// <para>For requests that are constructed from/for a document NEST will automatically infer the routing key
/// if that document has a <see cref = "Nest.JoinField"/> or a routing mapping on for its type exists on <see cref = "Nest.ConnectionSettings"/></para>
///</summary>
public GetDescriptor<TDocument> Routing(Routing routing) => Qs("routing", routing);
///<summary>Whether the _source should be included in the response.</summary>
public GetDescriptor<TDocument> SourceEnabled(bool? sourceenabled = true) => Qs("_source", sourceenabled);
///<summary>A list of fields to exclude from the returned _source field</summary>
public GetDescriptor<TDocument> SourceExcludes(Fields sourceexcludes) => Qs("_source_excludes", sourceexcludes);
///<summary>A list of fields to exclude from the returned _source field</summary>
public GetDescriptor<TDocument> SourceExcludes(params Expression<Func<TDocument, object>>[] fields) => Qs("_source_excludes", fields?.Select(e => (Field)e));
///<summary>A list of fields to extract and return from the _source field</summary>
public GetDescriptor<TDocument> SourceIncludes(Fields sourceincludes) => Qs("_source_includes", sourceincludes);
///<summary>A list of fields to extract and return from the _source field</summary>
public GetDescriptor<TDocument> SourceIncludes(params Expression<Func<TDocument, object>>[] fields) => Qs("_source_includes", fields?.Select(e => (Field)e));
///<summary>A comma-separated list of stored fields to return in the response</summary>
public GetDescriptor<TDocument> StoredFields(Fields storedfields) => Qs("stored_fields", storedfields);
///<summary>A comma-separated list of stored fields to return in the response</summary>
public GetDescriptor<TDocument> StoredFields(params Expression<Func<TDocument, object>>[] fields) => Qs("stored_fields", fields?.Select(e => (Field)e));
///<summary>Explicit version number for concurrency control</summary>
public GetDescriptor<TDocument> Version(long? version) => Qs("version", version);
///<summary>Specific version type</summary>
public GetDescriptor<TDocument> VersionType(VersionType? versiontype) => Qs("version_type", versiontype);
}
///<summary>Descriptor for GetScript <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html</para></summary>
public partial class GetScriptDescriptor : RequestDescriptorBase<GetScriptDescriptor, GetScriptRequestParameters, IGetScriptRequest>, IGetScriptRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceGetScript;
///<summary>/_scripts/{id}</summary>
///<param name = "id">this parameter is required</param>
public GetScriptDescriptor(Id id): base(r => r.Required("id", id))
{
}
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected GetScriptDescriptor(): base()
{
}
// values part of the url path
Id IGetScriptRequest.Id => Self.RouteValues.Get<Id>("id");
// Request parameters
///<summary>Specify timeout for connection to master</summary>
public GetScriptDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
}
///<summary>Descriptor for Source <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html</para></summary>
public partial class SourceDescriptor<TDocument> : RequestDescriptorBase<SourceDescriptor<TDocument>, SourceRequestParameters, ISourceRequest<TDocument>>, ISourceRequest<TDocument>
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceSource;
///<summary>/{index}/_source/{id}</summary>
///<param name = "index">this parameter is required</param>
///<param name = "id">this parameter is required</param>
public SourceDescriptor(IndexName index, Id id): base(r => r.Required("index", index).Required("id", id))
{
}
///<summary>/{index}/_source/{id}</summary>
///<param name = "id">this parameter is required</param>
public SourceDescriptor(Id id): this(typeof(TDocument), id)
{
}
///<summary>/{index}/_source/{id}</summary>
///<param name = "id">The document used to resolve the path from</param>
public SourceDescriptor(TDocument documentWithId, IndexName index = null, Id id = null): this(index ?? typeof(TDocument), id ?? Nest.Id.From(documentWithId)) => DocumentFromPath(documentWithId);
partial void DocumentFromPath(TDocument document);
///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
[SerializationConstructor]
protected SourceDescriptor(): base()
{
}
// values part of the url path
IndexName ISourceRequest.Index => Self.RouteValues.Get<IndexName>("index");
Id ISourceRequest.Id => Self.RouteValues.Get<Id>("id");
///<summary>The name of the index</summary>
public SourceDescriptor<TDocument> Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public SourceDescriptor<TDocument> Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v));
// Request parameters
///<summary>Specify the node or shard the operation should be performed on (default: random)</summary>
public SourceDescriptor<TDocument> Preference(string preference) => Qs("preference", preference);
///<summary>Specify whether to perform the operation in realtime or search mode</summary>
public SourceDescriptor<TDocument> Realtime(bool? realtime = true) => Qs("realtime", realtime);
///<summary>Refresh the shard containing the document before performing the operation</summary>
public SourceDescriptor<TDocument> Refresh(bool? refresh = true) => Qs("refresh", refresh);
///<summary>
/// A document is routed to a particular shard in an index using the following formula
/// <para> shard_num = hash(_routing) % num_primary_shards</para>
/// <para>Elasticsearch will use the document id if not provided. </para>
/// <para>For requests that are constructed from/for a document NEST will automatically infer the routing key
/// if that document has a <see cref = "Nest.JoinField"/> or a routing mapping on for its type exists on <see cref = "Nest.ConnectionSettings"/></para>
///</summary>
public SourceDescriptor<TDocument> Routing(Routing routing) => Qs("routing", routing);
///<summary>Whether the _source should be included in the response.</summary>
public SourceDescriptor<TDocument> SourceEnabled(bool? sourceenabled = true) => Qs("_source", sourceenabled);
///<summary>A list of fields to exclude from the returned _source field</summary>
public SourceDescriptor<TDocument> SourceExcludes(Fields sourceexcludes) => Qs("_source_excludes", sourceexcludes);
///<summary>A list of fields to exclude from the returned _source field</summary>
public SourceDescriptor<TDocument> SourceExcludes(params Expression<Func<TDocument, object>>[] fields) => Qs("_source_excludes", fields?.Select(e => (Field)e));
///<summary>A list of fields to extract and return from the _source field</summary>
public SourceDescriptor<TDocument> SourceIncludes(Fields sourceincludes) => Qs("_source_includes", sourceincludes);
///<summary>A list of fields to extract and return from the _source field</summary>
public SourceDescriptor<TDocument> SourceIncludes(params Expression<Func<TDocument, object>>[] fields) => Qs("_source_includes", fields?.Select(e => (Field)e));
///<summary>Explicit version number for concurrency control</summary>
public SourceDescriptor<TDocument> Version(long? version) => Qs("version", version);
///<summary>Specific version type</summary>
public SourceDescriptor<TDocument> VersionType(VersionType? versiontype) => Qs("version_type", versiontype);
}
///<summary>Descriptor for Index <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html</para></summary>
public partial class IndexDescriptor<TDocument> : RequestDescriptorBase<IndexDescriptor<TDocument>, IndexRequestParameters, IIndexRequest<TDocument>>, IIndexRequest<TDocument>
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceIndex;
///<summary>/{index}/_doc/{id}</summary>
///<param name = "index">this parameter is required</param>
///<param name = "id">Optional, accepts null</param>
public IndexDescriptor(IndexName index, Id id): base(r => r.Required("index", index).Optional("id", id))
{
}
///<summary>/{index}/_doc</summary>
///<param name = "index">this parameter is required</param>
public IndexDescriptor(IndexName index): base(r => r.Required("index", index))
{
}
///<summary>/{index}/_doc/{id}</summary>
///<param name = "id">Optional, accepts null</param>
public IndexDescriptor(Id id): this(typeof(TDocument), id)
{
}
///<summary>/{index}/_doc</summary>
public IndexDescriptor(): this(typeof(TDocument))
{
}
///<summary>/{index}/_doc/{id}</summary>
///<param name = "id">The document used to resolve the path from</param>
public IndexDescriptor(TDocument documentWithId, IndexName index = null, Id id = null): this(index ?? typeof(TDocument), id ?? Nest.Id.From(documentWithId)) => DocumentFromPath(documentWithId);
partial void DocumentFromPath(TDocument document);
// values part of the url path
IndexName IIndexRequest<TDocument>.Index => Self.RouteValues.Get<IndexName>("index");
Id IIndexRequest<TDocument>.Id => Self.RouteValues.Get<Id>("id");
///<summary>The name of the index</summary>
public IndexDescriptor<TDocument> Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public IndexDescriptor<TDocument> Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v));
///<summary>Document ID</summary>
public IndexDescriptor<TDocument> Id(Id id) => Assign(id, (a, v) => a.RouteValues.Optional("id", v));
// Request parameters
///<summary>only perform the index operation if the last operation that has changed the document has the specified primary term</summary>
public IndexDescriptor<TDocument> IfPrimaryTerm(long? ifprimaryterm) => Qs("if_primary_term", ifprimaryterm);
///<summary>only perform the index operation if the last operation that has changed the document has the specified sequence number</summary>
public IndexDescriptor<TDocument> IfSequenceNumber(long? ifsequencenumber) => Qs("if_seq_no", ifsequencenumber);
///<summary>Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create`for requests without an explicit document ID</summary>
public IndexDescriptor<TDocument> OpType(OpType? optype) => Qs("op_type", optype);
///<summary>The pipeline id to preprocess incoming documents with</summary>
public IndexDescriptor<TDocument> Pipeline(string pipeline) => Qs("pipeline", pipeline);
///<summary>If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.</summary>
public IndexDescriptor<TDocument> Refresh(Refresh? refresh) => Qs("refresh", refresh);
///<summary>When true, requires destination to be an alias. Default is false</summary>
public IndexDescriptor<TDocument> RequireAlias(bool? requirealias = true) => Qs("require_alias", requirealias);
///<summary>
/// A document is routed to a particular shard in an index using the following formula
/// <para> shard_num = hash(_routing) % num_primary_shards</para>
/// <para>Elasticsearch will use the document id if not provided. </para>
/// <para>For requests that are constructed from/for a document NEST will automatically infer the routing key
/// if that document has a <see cref = "Nest.JoinField"/> or a routing mapping on for its type exists on <see cref = "Nest.ConnectionSettings"/></para>
///</summary>
public IndexDescriptor<TDocument> Routing(Routing routing) => Qs("routing", routing);
///<summary>Explicit operation timeout</summary>
public IndexDescriptor<TDocument> Timeout(Time timeout) => Qs("timeout", timeout);
///<summary>Explicit version number for concurrency control</summary>
public IndexDescriptor<TDocument> Version(long? version) => Qs("version", version);
///<summary>Specific version type</summary>
public IndexDescriptor<TDocument> VersionType(VersionType? versiontype) => Qs("version_type", versiontype);
///<summary>Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)</summary>
public IndexDescriptor<TDocument> WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards);
}
///<summary>Descriptor for RootNodeInfo <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html</para></summary>
public partial class RootNodeInfoDescriptor : RequestDescriptorBase<RootNodeInfoDescriptor, RootNodeInfoRequestParameters, IRootNodeInfoRequest>, IRootNodeInfoRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceRootNodeInfo;
// values part of the url path
// Request parameters
}
///<summary>Descriptor for MultiGet <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html</para></summary>
public partial class MultiGetDescriptor : RequestDescriptorBase<MultiGetDescriptor, MultiGetRequestParameters, IMultiGetRequest>, IMultiGetRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceMultiGet;
///<summary>/_mget</summary>
public MultiGetDescriptor(): base()
{
}
///<summary>/{index}/_mget</summary>
///<param name = "index">Optional, accepts null</param>
public MultiGetDescriptor(IndexName index): base(r => r.Optional("index", index))
{
}
// values part of the url path
IndexName IMultiGetRequest.Index => Self.RouteValues.Get<IndexName>("index");
///<summary>The name of the index</summary>
public MultiGetDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public MultiGetDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (IndexName)v));
// Request parameters
///<summary>Specify the node or shard the operation should be performed on (default: random)</summary>
public MultiGetDescriptor Preference(string preference) => Qs("preference", preference);
///<summary>Specify whether to perform the operation in realtime or search mode</summary>
public MultiGetDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime);
///<summary>Refresh the shard containing the document before performing the operation</summary>
public MultiGetDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh);
///<summary>
/// A document is routed to a particular shard in an index using the following formula
/// <para> shard_num = hash(_routing) % num_primary_shards</para>
/// <para>Elasticsearch will use the document id if not provided. </para>
/// <para>For requests that are constructed from/for a document NEST will automatically infer the routing key
/// if that document has a <see cref = "Nest.JoinField"/> or a routing mapping on for its type exists on <see cref = "Nest.ConnectionSettings"/></para>
///</summary>
public MultiGetDescriptor Routing(Routing routing) => Qs("routing", routing);
///<summary>Whether the _source should be included in the response.</summary>
public MultiGetDescriptor SourceEnabled(bool? sourceenabled = true) => Qs("_source", sourceenabled);
///<summary>A list of fields to exclude from the returned _source field</summary>
public MultiGetDescriptor SourceExcludes(Fields sourceexcludes) => Qs("_source_excludes", sourceexcludes);
///<summary>A list of fields to exclude from the returned _source field</summary>
public MultiGetDescriptor SourceExcludes<T>(params Expression<Func<T, object>>[] fields)
where T : class => Qs("_source_excludes", fields?.Select(e => (Field)e));
///<summary>A list of fields to extract and return from the _source field</summary>
public MultiGetDescriptor SourceIncludes(Fields sourceincludes) => Qs("_source_includes", sourceincludes);
///<summary>A list of fields to extract and return from the _source field</summary>
public MultiGetDescriptor SourceIncludes<T>(params Expression<Func<T, object>>[] fields)
where T : class => Qs("_source_includes", fields?.Select(e => (Field)e));
}
///<summary>Descriptor for MultiSearch <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html</para></summary>
public partial class MultiSearchDescriptor : RequestDescriptorBase<MultiSearchDescriptor, MultiSearchRequestParameters, IMultiSearchRequest>, IMultiSearchRequest
{
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceMultiSearch;
///<summary>/_msearch</summary>
public MultiSearchDescriptor(): base()
{
}
///<summary>/{index}/_msearch</summary>
///<param name = "index">Optional, accepts null</param>
public MultiSearchDescriptor(Indices index): base(r => r.Optional("index", index))
{
}
// values part of the url path
Indices IMultiSearchRequest.Index => Self.RouteValues.Get<Indices>("index");
///<summary>A comma-separated list of index names to use as default</summary>
public MultiSearchDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v));
///<summary>a shortcut into calling Index(typeof(TOther))</summary>
public MultiSearchDescriptor Index<TOther>()
where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v));
///<summary>A shortcut into calling Index(Indices.All)</summary>
public MultiSearchDescriptor AllIndices() => Index(Indices.All);
// Request parameters
///<summary>Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution</summary>
public MultiSearchDescriptor CcsMinimizeRoundtrips(bool? ccsminimizeroundtrips = true) => Qs("ccs_minimize_roundtrips", ccsminimizeroundtrips);
///<summary>Controls the maximum number of concurrent searches the multi search api will execute</summary>
public MultiSearchDescriptor MaxConcurrentSearches(long? maxconcurrentsearches) => Qs("max_concurrent_searches", maxconcurrentsearches);
///<summary>The number of concurrent shard requests each sub search executes concurrently per node. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests</summary>
public MultiSearchDescriptor MaxConcurrentShardRequests(long? maxconcurrentshardrequests) => Qs("max_concurrent_shard_requests", maxconcurrentshardrequests);
///<summary>A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.</summary>
public MultiSearchDescriptor PreFilterShardSize(long? prefiltershardsize) => Qs("pre_filter_shard_size", prefiltershardsize);
///<summary>Search operation type</summary>
public MultiSearchDescriptor SearchType(SearchType? searchtype) => Qs("search_type", searchtype);
///<summary>Indicates whether hits.total should be rendered as an integer or an object in the rest search response</summary>
public MultiSearchDescriptor TotalHitsAsInteger(bool? totalhitsasinteger = true) => Qs("rest_total_hits_as_int", totalhitsasinteger);
///<summary>Specify whether aggregation and suggester names should be prefixed by their respective types in the response</summary>