-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy path_common.query_dsl.yaml
1956 lines (1956 loc) · 70.3 KB
/
_common.query_dsl.yaml
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
openapi: 3.1.0
info:
title: Schemas of _common.query_dsl category
description: Schemas of _common.query_dsl category
version: 1.0.0
paths: {}
components:
schemas:
Operator:
type: string
enum:
- and
- or
QueryContainer:
type: object
properties:
bool:
$ref: '#/components/schemas/BoolQuery'
boosting:
$ref: '#/components/schemas/BoostingQuery'
common:
deprecated: true
type: object
additionalProperties:
$ref: '#/components/schemas/CommonTermsQuery'
minProperties: 1
maxProperties: 1
combined_fields:
$ref: '#/components/schemas/CombinedFieldsQuery'
constant_score:
$ref: '#/components/schemas/ConstantScoreQuery'
dis_max:
$ref: '#/components/schemas/DisMaxQuery'
distance_feature:
$ref: '#/components/schemas/DistanceFeatureQuery'
exists:
$ref: '#/components/schemas/ExistsQuery'
function_score:
$ref: '#/components/schemas/FunctionScoreQuery'
fuzzy:
description: Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
type: object
additionalProperties:
$ref: '#/components/schemas/FuzzyQuery'
minProperties: 1
maxProperties: 1
geo_bounding_box:
$ref: '#/components/schemas/GeoBoundingBoxQuery'
geo_distance:
$ref: '#/components/schemas/GeoDistanceQuery'
geo_polygon:
$ref: '#/components/schemas/GeoPolygonQuery'
geo_shape:
$ref: '#/components/schemas/GeoShapeQuery'
has_child:
$ref: '#/components/schemas/HasChildQuery'
has_parent:
$ref: '#/components/schemas/HasParentQuery'
ids:
$ref: '#/components/schemas/IdsQuery'
intervals:
description: Returns documents based on the order and proximity of matching terms.
type: object
additionalProperties:
$ref: '#/components/schemas/IntervalsQuery'
minProperties: 1
maxProperties: 1
match:
description: |-
Returns documents that match a provided text, number, date or boolean value.
The provided text is analyzed before matching.
type: object
additionalProperties:
anyOf:
- $ref: '#/components/schemas/MatchQuery'
- { }
minProperties: 1
maxProperties: 1
match_all:
$ref: '#/components/schemas/MatchAllQuery'
match_bool_prefix:
description: |-
Analyzes its input and constructs a `bool` query from the terms.
Each term except the last is used in a `term` query.
The last term is used in a prefix query.
type: object
additionalProperties:
$ref: '#/components/schemas/MatchBoolPrefixQuery'
minProperties: 1
maxProperties: 1
match_none:
$ref: '#/components/schemas/MatchNoneQuery'
match_phrase:
description: Analyzes the text and creates a phrase query out of the analyzed text.
type: object
additionalProperties:
$ref: '#/components/schemas/MatchPhraseQuery'
minProperties: 1
maxProperties: 1
match_phrase_prefix:
description: |-
Returns documents that contain the words of a provided text, in the same order as provided.
The last term of the provided text is treated as a prefix, matching any words that begin with that term.
type: object
additionalProperties:
$ref: '#/components/schemas/MatchPhrasePrefixQuery'
minProperties: 1
maxProperties: 1
more_like_this:
$ref: '#/components/schemas/MoreLikeThisQuery'
multi_match:
$ref: '#/components/schemas/MultiMatchQuery'
nested:
$ref: '#/components/schemas/NestedQuery'
neural:
$ref: '#/components/schemas/NeuralQuery'
parent_id:
$ref: '#/components/schemas/ParentIdQuery'
percolate:
$ref: '#/components/schemas/PercolateQuery'
pinned:
$ref: '#/components/schemas/PinnedQuery'
prefix:
description: Returns documents that contain a specific prefix in a provided field.
type: object
additionalProperties:
$ref: '#/components/schemas/PrefixQuery'
minProperties: 1
maxProperties: 1
query_string:
$ref: '#/components/schemas/QueryStringQuery'
range:
description: Returns documents that contain terms within a provided range.
type: object
additionalProperties:
$ref: '#/components/schemas/RangeQuery'
minProperties: 1
maxProperties: 1
rank_feature:
$ref: '#/components/schemas/RankFeatureQuery'
regexp:
description: Returns documents that contain terms matching a regular expression.
type: object
additionalProperties:
$ref: '#/components/schemas/RegexpQuery'
minProperties: 1
maxProperties: 1
rule_query:
$ref: '#/components/schemas/RuleQuery'
script:
$ref: '#/components/schemas/ScriptQuery'
script_score:
$ref: '#/components/schemas/ScriptScoreQuery'
shape:
$ref: '#/components/schemas/ShapeQuery'
simple_query_string:
$ref: '#/components/schemas/SimpleQueryStringQuery'
span_containing:
$ref: '#/components/schemas/SpanContainingQuery'
field_masking_span:
$ref: '#/components/schemas/SpanFieldMaskingQuery'
span_first:
$ref: '#/components/schemas/SpanFirstQuery'
span_multi:
$ref: '#/components/schemas/SpanMultiTermQuery'
span_near:
$ref: '#/components/schemas/SpanNearQuery'
span_not:
$ref: '#/components/schemas/SpanNotQuery'
span_or:
$ref: '#/components/schemas/SpanOrQuery'
span_term:
description: Matches spans containing a term.
type: object
additionalProperties:
$ref: '#/components/schemas/SpanTermQuery'
minProperties: 1
maxProperties: 1
span_within:
$ref: '#/components/schemas/SpanWithinQuery'
term:
description: |-
Returns documents that contain an exact term in a provided field.
To return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.
type: object
additionalProperties:
anyOf:
- $ref: '#/components/schemas/TermQuery'
- $ref: '_common.yaml#/components/schemas/FieldValue'
minProperties: 1
maxProperties: 1
terms:
$ref: '#/components/schemas/TermsQuery'
terms_set:
description: |-
Returns documents that contain a minimum number of exact terms in a provided field.
To return a document, a required number of terms must exactly match the field values, including whitespace and capitalization.
type: object
additionalProperties:
$ref: '#/components/schemas/TermsSetQuery'
minProperties: 1
maxProperties: 1
text_expansion:
description: Uses a natural language processing model to convert the query text into a list of token-weight pairs which are then used in a query against a sparse vector or rank features field.
type: object
additionalProperties:
$ref: '#/components/schemas/TextExpansionQuery'
minProperties: 1
maxProperties: 1
weighted_tokens:
description: Supports returning text_expansion query results by sending in precomputed tokens with the query.
type: object
additionalProperties:
$ref: '#/components/schemas/WeightedTokensQuery'
minProperties: 1
maxProperties: 1
wildcard:
description: Returns documents that contain terms matching a wildcard pattern.
type: object
additionalProperties:
$ref: '#/components/schemas/WildcardQuery'
minProperties: 1
maxProperties: 1
wrapper:
$ref: '#/components/schemas/WrapperQuery'
type:
$ref: '#/components/schemas/TypeQuery'
minProperties: 1
maxProperties: 1
BoolQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
filter:
description: |-
The clause (query) must appear in matching documents.
However, unlike `must`, the score of the query will be ignored.
oneOf:
- $ref: '#/components/schemas/QueryContainer'
- type: array
items:
$ref: '#/components/schemas/QueryContainer'
minimum_should_match:
$ref: '_common.yaml#/components/schemas/MinimumShouldMatch'
must:
description: The clause (query) must appear in matching documents and will contribute to the score.
oneOf:
- $ref: '#/components/schemas/QueryContainer'
- type: array
items:
$ref: '#/components/schemas/QueryContainer'
must_not:
description: |-
The clause (query) must not appear in the matching documents.
Because scoring is ignored, a score of `0` is returned for all documents.
oneOf:
- $ref: '#/components/schemas/QueryContainer'
- type: array
items:
$ref: '#/components/schemas/QueryContainer'
should:
description: The clause (query) should appear in the matching document.
oneOf:
- $ref: '#/components/schemas/QueryContainer'
- type: array
items:
$ref: '#/components/schemas/QueryContainer'
QueryBase:
type: object
properties:
boost:
description: |-
Floating point number used to decrease or increase the relevance scores of the query.
Boost values are relative to the default value of 1.0.
A boost value between 0 and 1.0 decreases the relevance score.
A value greater than 1.0 increases the relevance score.
type: number
_name:
type: string
BoostingQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
negative_boost:
description: Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the `negative` query.
type: number
negative:
$ref: '#/components/schemas/QueryContainer'
positive:
$ref: '#/components/schemas/QueryContainer'
required:
- negative
- negative_boost
- positive
CommonTermsQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
analyzer:
type: string
cutoff_frequency:
type: number
high_freq_operator:
$ref: '#/components/schemas/Operator'
low_freq_operator:
$ref: '#/components/schemas/Operator'
minimum_should_match:
$ref: '_common.yaml#/components/schemas/MinimumShouldMatch'
query:
type: string
required:
- query
CombinedFieldsQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
fields:
description: List of fields to search. Field wildcard patterns are allowed. Only `text` fields are supported, and they must all have the same search `analyzer`.
type: array
items:
$ref: '_common.yaml#/components/schemas/Field'
query:
description: |-
Text to search for in the provided `fields`.
The `combined_fields` query analyzes the provided text before performing a search.
type: string
auto_generate_synonyms_phrase_query:
description: If true, match phrase queries are automatically created for multi-term synonyms.
type: boolean
operator:
$ref: '#/components/schemas/CombinedFieldsOperator'
minimum_should_match:
$ref: '_common.yaml#/components/schemas/MinimumShouldMatch'
zero_terms_query:
$ref: '#/components/schemas/CombinedFieldsZeroTerms'
required:
- fields
- query
CombinedFieldsOperator:
type: string
enum:
- and
- or
CombinedFieldsZeroTerms:
type: string
enum:
- all
- none
ConstantScoreQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
filter:
$ref: '#/components/schemas/QueryContainer'
required:
- filter
DisMaxQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
queries:
description: |-
One or more query clauses.
Returned documents must match one or more of these queries.
If a document matches multiple queries, OpenSearch uses the highest relevance score.
type: array
items:
$ref: '#/components/schemas/QueryContainer'
tie_breaker:
description: Floating point number between 0 and 1.0 used to increase the relevance scores of documents matching multiple query clauses.
type: number
required:
- queries
DistanceFeatureQuery:
oneOf:
- $ref: '#/components/schemas/GeoDistanceFeatureQuery'
- $ref: '#/components/schemas/DateDistanceFeatureQuery'
GeoDistanceFeatureQuery:
allOf:
- $ref: '#/components/schemas/DistanceFeatureQueryBaseGeoLocationDistance'
- type: object
DistanceFeatureQueryBaseGeoLocationDistance:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
origin:
$ref: '_common.yaml#/components/schemas/GeoLocation'
pivot:
$ref: '_common.yaml#/components/schemas/Distance'
field:
$ref: '_common.yaml#/components/schemas/Field'
required:
- field
- origin
- pivot
DateDistanceFeatureQuery:
allOf:
- $ref: '#/components/schemas/DistanceFeatureQueryBaseDateMathDuration'
- type: object
DistanceFeatureQueryBaseDateMathDuration:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
origin:
$ref: '_common.yaml#/components/schemas/DateMath'
pivot:
$ref: '_common.yaml#/components/schemas/Duration'
field:
$ref: '_common.yaml#/components/schemas/Field'
required:
- field
- origin
- pivot
ExistsQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
field:
$ref: '_common.yaml#/components/schemas/Field'
required:
- field
FunctionScoreQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
boost_mode:
$ref: '#/components/schemas/FunctionBoostMode'
functions:
description: One or more functions that compute a new score for each document returned by the query.
type: array
items:
$ref: '#/components/schemas/FunctionScoreContainer'
max_boost:
description: Restricts the new score to not exceed the provided limit.
type: number
min_score:
description: Excludes documents that do not meet the provided score threshold.
type: number
query:
$ref: '#/components/schemas/QueryContainer'
score_mode:
$ref: '#/components/schemas/FunctionScoreMode'
FunctionBoostMode:
type: string
enum:
- avg
- max
- min
- multiply
- replace
- sum
FunctionScoreContainer:
allOf:
- type: object
properties:
filter:
$ref: '#/components/schemas/QueryContainer'
weight:
type: number
- type: object
properties:
exp:
$ref: '#/components/schemas/DecayFunction'
gauss:
$ref: '#/components/schemas/DecayFunction'
linear:
$ref: '#/components/schemas/DecayFunction'
field_value_factor:
$ref: '#/components/schemas/FieldValueFactorScoreFunction'
random_score:
$ref: '#/components/schemas/RandomScoreFunction'
script_score:
$ref: '#/components/schemas/ScriptScoreFunction'
minProperties: 1
maxProperties: 1
DecayFunction:
oneOf:
- $ref: '#/components/schemas/DateDecayFunction'
- $ref: '#/components/schemas/NumericDecayFunction'
- $ref: '#/components/schemas/GeoDecayFunction'
DateDecayFunction:
allOf:
- $ref: '#/components/schemas/DecayFunctionBase'
- type: object
DecayFunctionBase:
type: object
properties:
multi_value_mode:
$ref: '#/components/schemas/MultiValueMode'
MultiValueMode:
type: string
enum:
- avg
- max
- min
- sum
NumericDecayFunction:
allOf:
- $ref: '#/components/schemas/DecayFunctionBase'
- type: object
GeoDecayFunction:
allOf:
- $ref: '#/components/schemas/DecayFunctionBase'
- type: object
FieldValueFactorScoreFunction:
type: object
properties:
field:
$ref: '_common.yaml#/components/schemas/Field'
factor:
description: Optional factor to multiply the field value with.
type: number
missing:
description: |-
Value used if the document doesn't have that field.
The modifier and factor are still applied to it as though it were read from the document.
type: number
modifier:
$ref: '#/components/schemas/FieldValueFactorModifier'
required:
- field
FieldValueFactorModifier:
type: string
enum:
- ln
- ln1p
- ln2p
- log
- log1p
- log2p
- none
- reciprocal
- sqrt
- square
RandomScoreFunction:
type: object
properties:
field:
$ref: '_common.yaml#/components/schemas/Field'
seed:
oneOf:
- type: number
- type: string
ScriptScoreFunction:
type: object
properties:
script:
$ref: '_common.yaml#/components/schemas/Script'
required:
- script
FunctionScoreMode:
type: string
enum:
- avg
- first
- max
- min
- multiply
- sum
FuzzyQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
max_expansions:
description: Maximum number of variations created.
type: number
prefix_length:
description: Number of beginning characters left unchanged when creating expansions.
type: number
rewrite:
$ref: '_common.yaml#/components/schemas/MultiTermQueryRewrite'
transpositions:
description: Indicates whether edits include transpositions of two adjacent characters (for example `ab` to `ba`).
type: boolean
fuzziness:
$ref: '_common.yaml#/components/schemas/Fuzziness'
value:
description: Term you wish to find in the provided field.
oneOf:
- type: string
- type: number
- type: boolean
required:
- value
GeoBoundingBoxQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
type:
$ref: '#/components/schemas/GeoExecution'
validation_method:
$ref: '#/components/schemas/GeoValidationMethod'
ignore_unmapped:
description: |-
Set to `true` to ignore an unmapped field and not match any documents for this query.
Set to `false` to throw an exception if the field is not mapped.
type: boolean
GeoExecution:
type: string
enum:
- indexed
- memory
GeoValidationMethod:
type: string
enum:
- coerce
- ignore_malformed
- strict
GeoDistanceQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
distance:
$ref: '_common.yaml#/components/schemas/Distance'
distance_type:
$ref: '_common.yaml#/components/schemas/GeoDistanceType'
validation_method:
$ref: '#/components/schemas/GeoValidationMethod'
ignore_unmapped:
description: |-
Set to `true` to ignore an unmapped field and not match any documents for this query.
Set to `false` to throw an exception if the field is not mapped.
type: boolean
default: false
field:
type: object
required:
- distance
- field
GeoPolygonQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
validation_method:
$ref: '#/components/schemas/GeoValidationMethod'
ignore_unmapped:
type: boolean
GeoShapeQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
ignore_unmapped:
description: |-
Set to `true` to ignore an unmapped field and not match any documents for this query.
Set to `false` to throw an exception if the field is not mapped.
type: boolean
HasChildQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
ignore_unmapped:
description: Indicates whether to ignore an unmapped `type` and not return any documents instead of an error.
type: boolean
inner_hits:
$ref: '_core.search.yaml#/components/schemas/InnerHits'
max_children:
description: |-
Maximum number of child documents that match the query allowed for a returned parent document.
If the parent document exceeds this limit, it is excluded from the search results.
type: number
min_children:
description: |-
Minimum number of child documents that match the query required to match the query for a returned parent document.
If the parent document does not meet this limit, it is excluded from the search results.
type: number
query:
$ref: '#/components/schemas/QueryContainer'
score_mode:
$ref: '#/components/schemas/ChildScoreMode'
type:
$ref: '_common.yaml#/components/schemas/RelationName'
required:
- query
- type
FieldAndFormat:
type: object
properties:
field:
$ref: '_common.yaml#/components/schemas/Field'
format:
description: Format in which the values are returned.
type: string
include_unmapped:
type: boolean
required:
- field
ChildScoreMode:
type: string
enum:
- avg
- max
- min
- none
- sum
HasParentQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
ignore_unmapped:
description: |-
Indicates whether to ignore an unmapped `parent_type` and not return any documents instead of an error.
You can use this parameter to query multiple indices that may not contain the `parent_type`.
type: boolean
inner_hits:
$ref: '_core.search.yaml#/components/schemas/InnerHits'
parent_type:
$ref: '_common.yaml#/components/schemas/RelationName'
query:
$ref: '#/components/schemas/QueryContainer'
score:
description: Indicates whether the relevance score of a matching parent document is aggregated into its child documents.
type: boolean
required:
- parent_type
- query
IdsQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
values:
$ref: '_common.yaml#/components/schemas/Ids'
IntervalsQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
all_of:
$ref: '#/components/schemas/IntervalsAllOf'
any_of:
$ref: '#/components/schemas/IntervalsAnyOf'
fuzzy:
$ref: '#/components/schemas/IntervalsFuzzy'
match:
$ref: '#/components/schemas/IntervalsMatch'
prefix:
$ref: '#/components/schemas/IntervalsPrefix'
wildcard:
$ref: '#/components/schemas/IntervalsWildcard'
minProperties: 1
maxProperties: 1
IntervalsAllOf:
type: object
properties:
intervals:
description: An array of rules to combine. All rules must produce a match in a document for the overall source to match.
type: array
items:
$ref: '#/components/schemas/IntervalsContainer'
max_gaps:
description: |-
Maximum number of positions between the matching terms.
Intervals produced by the rules further apart than this are not considered matches.
type: number
ordered:
description: If `true`, intervals produced by the rules should appear in the order in which they are specified.
type: boolean
filter:
$ref: '#/components/schemas/IntervalsFilter'
required:
- intervals
IntervalsContainer:
type: object
properties:
all_of:
$ref: '#/components/schemas/IntervalsAllOf'
any_of:
$ref: '#/components/schemas/IntervalsAnyOf'
fuzzy:
$ref: '#/components/schemas/IntervalsFuzzy'
match:
$ref: '#/components/schemas/IntervalsMatch'
prefix:
$ref: '#/components/schemas/IntervalsPrefix'
wildcard:
$ref: '#/components/schemas/IntervalsWildcard'
minProperties: 1
maxProperties: 1
IntervalsAnyOf:
type: object
properties:
intervals:
description: An array of rules to match.
type: array
items:
$ref: '#/components/schemas/IntervalsContainer'
filter:
$ref: '#/components/schemas/IntervalsFilter'
required:
- intervals
IntervalsFilter:
type: object
properties:
after:
$ref: '#/components/schemas/IntervalsContainer'
before:
$ref: '#/components/schemas/IntervalsContainer'
contained_by:
$ref: '#/components/schemas/IntervalsContainer'
containing:
$ref: '#/components/schemas/IntervalsContainer'
not_contained_by:
$ref: '#/components/schemas/IntervalsContainer'
not_containing:
$ref: '#/components/schemas/IntervalsContainer'
not_overlapping:
$ref: '#/components/schemas/IntervalsContainer'
overlapping:
$ref: '#/components/schemas/IntervalsContainer'
script:
$ref: '_common.yaml#/components/schemas/Script'
minProperties: 1
maxProperties: 1
IntervalsFuzzy:
type: object
properties:
analyzer:
description: Analyzer used to normalize the term.
type: string
fuzziness:
$ref: '_common.yaml#/components/schemas/Fuzziness'
prefix_length:
description: Number of beginning characters left unchanged when creating expansions.
type: number
term:
description: The term to match.
type: string
transpositions:
description: Indicates whether edits include transpositions of two adjacent characters (for example, `ab` to `ba`).
type: boolean
use_field:
$ref: '_common.yaml#/components/schemas/Field'
required:
- term
IntervalsMatch:
type: object
properties:
analyzer:
description: Analyzer used to analyze terms in the query.
type: string
max_gaps:
description: |-
Maximum number of positions between the matching terms.
Terms further apart than this are not considered matches.
type: number
ordered:
description: If `true`, matching terms must appear in their specified order.
type: boolean
query:
description: Text you wish to find in the provided field.
type: string
use_field:
$ref: '_common.yaml#/components/schemas/Field'
filter:
$ref: '#/components/schemas/IntervalsFilter'
required:
- query
IntervalsPrefix:
type: object
properties:
analyzer:
description: Analyzer used to analyze the `prefix`.
type: string
prefix:
description: Beginning characters of terms you wish to find in the top-level field.
type: string
use_field:
$ref: '_common.yaml#/components/schemas/Field'
required:
- prefix
IntervalsWildcard:
type: object
properties:
analyzer:
description: |-
Analyzer used to analyze the `pattern`.
Defaults to the top-level field's analyzer.
type: string
pattern:
description: Wildcard pattern used to find matching terms.
type: string
use_field:
$ref: '_common.yaml#/components/schemas/Field'
required:
- pattern
MatchQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
analyzer:
description: Analyzer used to convert the text in the query value into tokens.
type: string
auto_generate_synonyms_phrase_query:
description: If `true`, match phrase queries are automatically created for multi-term synonyms.
type: boolean
cutoff_frequency:
deprecated: true
type: number
fuzziness:
$ref: '_common.yaml#/components/schemas/Fuzziness'
fuzzy_rewrite:
$ref: '_common.yaml#/components/schemas/MultiTermQueryRewrite'
fuzzy_transpositions:
description: If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).
type: boolean
lenient:
description: If `true`, format-based errors, such as providing a text query value for a numeric field, are ignored.
type: boolean
max_expansions:
description: Maximum number of terms to which the query will expand.
type: number
minimum_should_match:
$ref: '_common.yaml#/components/schemas/MinimumShouldMatch'
operator:
$ref: '#/components/schemas/Operator'
prefix_length:
description: Number of beginning characters left unchanged for fuzzy matching.
type: number
query:
description: Text, number, boolean value or date you wish to find in the provided field.
oneOf:
- type: string
- type: number
- type: boolean
zero_terms_query:
$ref: '#/components/schemas/ZeroTermsQuery'
required:
- query
ZeroTermsQuery:
type: string
enum:
- all
- none
MatchAllQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
MatchBoolPrefixQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
analyzer:
description: Analyzer used to convert the text in the query value into tokens.
type: string
fuzziness:
$ref: '_common.yaml#/components/schemas/Fuzziness'
fuzzy_rewrite:
$ref: '_common.yaml#/components/schemas/MultiTermQueryRewrite'
fuzzy_transpositions:
description: |-
If `true`, edits for fuzzy matching include transpositions of two adjacent characters (for example, `ab` to `ba`).
Can be applied to the term subqueries constructed for all terms but the final term.
type: boolean
max_expansions:
description: |-
Maximum number of terms to which the query will expand.
Can be applied to the term subqueries constructed for all terms but the final term.
type: number
minimum_should_match:
$ref: '_common.yaml#/components/schemas/MinimumShouldMatch'
operator:
$ref: '#/components/schemas/Operator'
prefix_length:
description: |-
Number of beginning characters left unchanged for fuzzy matching.
Can be applied to the term subqueries constructed for all terms but the final term.
type: number
query:
description: |-
Terms you wish to find in the provided field.
The last term is used in a prefix query.
type: string
required:
- query
MatchNoneQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
MatchPhraseQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'