forked from opensearch-project/opensearch-api-specification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_core.search.yaml
986 lines (986 loc) · 27.3 KB
/
_core.search.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
openapi: 3.1.0
info:
title: Schemas of `_core.search` Category
description: Schemas of `_core.search` category.
version: 1.0.0
paths: {}
components:
schemas:
HitsMetadata:
type: object
properties:
total:
description: The total number of hits, present only if `track_total_hits` is not set to `false` in the search request.
oneOf:
- $ref: '#/components/schemas/TotalHits'
- type: integer
format: int64
hits:
type: array
items:
$ref: '#/components/schemas/Hit'
max_score:
type: ['null', number, string]
required:
- hits
TotalHits:
type: object
properties:
relation:
$ref: '#/components/schemas/TotalHitsRelation'
value:
type: integer
format: int64
required:
- relation
- value
TotalHitsRelation:
type: string
enum:
- eq
- gte
Hit:
type: object
properties:
_type:
$ref: '_common.yaml#/components/schemas/Type'
_index:
$ref: '_common.yaml#/components/schemas/IndexName'
_id:
$ref: '_common.yaml#/components/schemas/Id'
_score:
type: ['null', number, string]
_explanation:
$ref: '_core.explain.yaml#/components/schemas/Explanation'
fields:
type: object
additionalProperties: true
highlight:
type: object
additionalProperties:
type: array
items:
type: string
inner_hits:
type: object
additionalProperties:
$ref: '#/components/schemas/InnerHitsResult'
matched_queries:
type: array
items:
type: string
_nested:
$ref: '#/components/schemas/NestedIdentity'
_ignored:
type: array
items:
type: string
ignored_field_values:
type: object
additionalProperties:
type: array
items:
type: string
_shard:
type: string
_node:
type: string
_routing:
type: string
_source:
type: object
_seq_no:
$ref: '_common.yaml#/components/schemas/SequenceNumber'
_primary_term:
type: integer
format: int64
_version:
$ref: '_common.yaml#/components/schemas/VersionNumber'
sort:
$ref: '_common.yaml#/components/schemas/SortResults'
required:
- _id
- _index
InnerHitsResult:
type: object
properties:
hits:
$ref: '#/components/schemas/HitsMetadata'
required:
- hits
NestedIdentity:
type: object
properties:
field:
$ref: '_common.yaml#/components/schemas/Field'
offset:
type: integer
format: int32
_nested:
$ref: '#/components/schemas/NestedIdentity'
required:
- field
- offset
Profile:
type: object
properties:
shards:
type: array
items:
$ref: '#/components/schemas/ShardProfile'
required:
- shards
ShardProfile:
type: object
properties:
aggregations:
type: array
items:
$ref: '#/components/schemas/AggregationProfile'
id:
type: string
searches:
type: array
items:
$ref: '#/components/schemas/SearchProfile'
fetch:
$ref: '#/components/schemas/FetchProfile'
required:
- aggregations
- id
- searches
AggregationProfile:
type: object
properties:
breakdown:
$ref: '#/components/schemas/AggregationBreakdown'
description:
type: string
time_in_nanos:
$ref: '_common.yaml#/components/schemas/DurationValueUnitNanos'
type:
type: string
debug:
$ref: '#/components/schemas/AggregationProfileDebug'
children:
type: array
items:
$ref: '#/components/schemas/AggregationProfile'
required:
- breakdown
- description
- time_in_nanos
- type
AggregationBreakdown:
type: object
properties:
build_aggregation:
type: integer
format: int64
build_aggregation_count:
type: integer
format: int64
build_leaf_collector:
type: integer
format: int64
build_leaf_collector_count:
type: integer
format: int64
collect:
type: integer
format: int64
collect_count:
type: integer
format: int64
initialize:
type: integer
format: int64
initialize_count:
type: integer
format: int64
post_collection:
type: integer
format: int64
post_collection_count:
type: integer
format: int64
reduce:
type: integer
format: int64
reduce_count:
type: integer
format: int64
required:
- build_aggregation
- build_aggregation_count
- build_leaf_collector
- build_leaf_collector_count
- collect
- collect_count
- initialize
- initialize_count
- reduce
- reduce_count
AggregationProfileDebug:
type: object
properties:
segments_with_multi_valued_ords:
type: integer
format: int32
collection_strategy:
type: string
segments_with_single_valued_ords:
type: integer
format: int32
total_buckets:
type: integer
format: int32
built_buckets:
type: integer
format: int32
result_strategy:
type: string
has_filter:
type: boolean
delegate:
type: string
delegate_debug:
$ref: '#/components/schemas/AggregationProfileDebug'
chars_fetched:
type: integer
format: int32
extract_count:
type: integer
format: int32
extract_ns:
type: integer
format: int32
values_fetched:
type: integer
format: int32
collect_analyzed_ns:
type: integer
format: int32
collect_analyzed_count:
type: integer
format: int32
surviving_buckets:
type: integer
format: int32
ordinals_collectors_used:
type: integer
format: int32
ordinals_collectors_overhead_too_high:
type: integer
format: int32
string_hashing_collectors_used:
type: integer
format: int32
numeric_collectors_used:
type: integer
format: int32
empty_collectors_used:
type: integer
format: int32
deferred_aggregators:
type: array
items:
type: string
segments_with_doc_count_field:
type: integer
format: int32
segments_with_deleted_docs:
type: integer
format: int32
filters:
type: array
items:
$ref: '#/components/schemas/AggregationProfileDelegateDebugFilter'
segments_counted:
type: integer
format: int32
segments_collected:
type: integer
format: int32
map_reducer:
type: string
AggregationProfileDelegateDebugFilter:
type: object
properties:
results_from_metadata:
type: integer
format: int32
query:
type: string
specialized_for:
type: string
segments_counted_in_constant_time:
type: integer
format: int32
SearchProfile:
type: object
properties:
collector:
type: array
items:
$ref: '#/components/schemas/Collector'
query:
type: array
items:
$ref: '#/components/schemas/QueryProfile'
rewrite_time:
type: integer
format: int64
required:
- collector
- query
- rewrite_time
Collector:
type: object
properties:
name:
type: string
reason:
type: string
time_in_nanos:
$ref: '_common.yaml#/components/schemas/DurationValueUnitNanos'
children:
type: array
items:
$ref: '#/components/schemas/Collector'
required:
- name
- reason
- time_in_nanos
QueryProfile:
type: object
properties:
breakdown:
$ref: '#/components/schemas/QueryBreakdown'
description:
type: string
time_in_nanos:
$ref: '_common.yaml#/components/schemas/DurationValueUnitNanos'
type:
type: string
children:
type: array
items:
$ref: '#/components/schemas/QueryProfile'
required:
- breakdown
- description
- time_in_nanos
- type
QueryBreakdown:
type: object
properties:
advance:
type: integer
format: int64
advance_count:
type: integer
format: int64
build_scorer:
type: integer
format: int64
build_scorer_count:
type: integer
format: int64
create_weight:
type: integer
format: int64
create_weight_count:
type: integer
format: int64
match:
type: integer
format: int64
match_count:
type: integer
format: int64
shallow_advance:
type: integer
format: int64
shallow_advance_count:
type: integer
format: int64
next_doc:
type: integer
format: int64
next_doc_count:
type: integer
format: int64
score:
type: integer
format: int64
score_count:
type: integer
format: int64
compute_max_score:
type: integer
format: int64
compute_max_score_count:
type: integer
format: int64
set_min_competitive_score:
type: integer
format: int64
set_min_competitive_score_count:
type: integer
format: int64
required:
- advance
- advance_count
- build_scorer
- build_scorer_count
- compute_max_score
- compute_max_score_count
- create_weight
- create_weight_count
- match
- match_count
- next_doc
- next_doc_count
- score
- score_count
- set_min_competitive_score
- set_min_competitive_score_count
- shallow_advance
- shallow_advance_count
FetchProfile:
type: object
properties:
type:
type: string
description:
type: string
time_in_nanos:
$ref: '_common.yaml#/components/schemas/DurationValueUnitNanos'
breakdown:
$ref: '#/components/schemas/FetchProfileBreakdown'
debug:
$ref: '#/components/schemas/FetchProfileDebug'
children:
type: array
items:
$ref: '#/components/schemas/FetchProfile'
required:
- breakdown
- description
- time_in_nanos
- type
FetchProfileBreakdown:
type: object
properties:
load_source:
type: number
load_source_count:
type: number
load_stored_fields:
type: integer
format: int32
load_stored_fields_count:
type: integer
format: int32
next_reader:
type: integer
format: int32
next_reader_count:
type: integer
format: int32
process_count:
type: integer
format: int32
process:
type: integer
format: int32
FetchProfileDebug:
type: object
properties:
stored_fields:
type: array
items:
type: string
fast_path:
type: integer
format: int32
Suggest:
oneOf:
- $ref: '#/components/schemas/CompletionSuggest'
- $ref: '#/components/schemas/PhraseSuggest'
- $ref: '#/components/schemas/TermSuggest'
CompletionSuggest:
allOf:
- $ref: '#/components/schemas/SuggestBase'
- type: object
properties:
options:
oneOf:
- $ref: '#/components/schemas/CompletionSuggestOption'
- type: array
items:
$ref: '#/components/schemas/CompletionSuggestOption'
required:
- options
CompletionSuggestOption:
type: object
properties:
collate_match:
type: boolean
contexts:
type: object
additionalProperties:
type: array
items:
$ref: '#/components/schemas/Context'
fields:
type: object
additionalProperties:
type: object
_id:
type: string
_index:
$ref: '_common.yaml#/components/schemas/IndexName'
_routing:
$ref: '_common.yaml#/components/schemas/Routing'
_score:
type: number
format: float
_source:
type: object
text:
type: string
score:
type: number
format: float
required:
- text
Context:
description: Text or location that we want similar documents for or a lookup to a document's field for the text.
oneOf:
- type: string
- $ref: '_common.yaml#/components/schemas/GeoLocation'
SuggestBase:
type: object
properties:
length:
type: integer
format: int32
offset:
type: integer
format: int32
text:
type: string
required:
- length
- offset
- text
PhraseSuggest:
allOf:
- $ref: '#/components/schemas/SuggestBase'
- type: object
properties:
options:
oneOf:
- $ref: '#/components/schemas/PhraseSuggestOption'
- type: array
items:
$ref: '#/components/schemas/PhraseSuggestOption'
required:
- options
PhraseSuggestOption:
type: object
properties:
text:
type: string
score:
type: number
format: float
highlighted:
type: string
collate_match:
type: boolean
required:
- score
- text
TermSuggest:
allOf:
- $ref: '#/components/schemas/SuggestBase'
- type: object
properties:
options:
oneOf:
- $ref: '#/components/schemas/TermSuggestOption'
- type: array
items:
$ref: '#/components/schemas/TermSuggestOption'
required:
- options
TermSuggestOption:
type: object
properties:
text:
type: string
score:
type: number
format: float
freq:
type: number
format: double
highlighted:
type: string
collate_match:
type: boolean
required:
- freq
- score
- text
TrackHits:
description: |-
The number of hits matching the query. When `true`, the exact
number of hits is returned at the cost of some performance. When `false`, the
response does not include the total number of hits matching the query.
Default is `10,000` hits.
oneOf:
- type: boolean
- type: integer
format: int32
SourceConfigParam:
description: |-
Defines how to fetch a source. Fetching can be disabled entirely, or the source can be filtered.
Use this setting with the `_source_includes` and `_source_excludes` parameters.
oneOf:
- type: boolean
- $ref: '_common.yaml#/components/schemas/Fields'
InnerHits:
type: object
properties:
name:
$ref: '_common.yaml#/components/schemas/Name'
size:
description: The maximum number of hits to return per `inner_hits`.
type: integer
format: int32
from:
description: The inner hit that initiates document offset.
type: integer
format: int32
collapse:
$ref: '#/components/schemas/FieldCollapse'
docvalue_fields:
type: array
items:
$ref: '_common.query_dsl.yaml#/components/schemas/FieldAndFormat'
explain:
type: boolean
highlight:
$ref: '#/components/schemas/Highlight'
ignore_unmapped:
type: boolean
script_fields:
type: object
additionalProperties:
$ref: '_common.yaml#/components/schemas/ScriptField'
seq_no_primary_term:
type: boolean
fields:
$ref: '_common.yaml#/components/schemas/Fields'
sort:
$ref: '_common.yaml#/components/schemas/Sort'
_source:
$ref: '#/components/schemas/SourceConfig'
stored_fields:
$ref: '_common.yaml#/components/schemas/Fields'
track_scores:
type: boolean
version:
type: boolean
FieldCollapse:
type: object
properties:
field:
$ref: '_common.yaml#/components/schemas/Field'
inner_hits:
description: The number of inner hits and their sort order.
oneOf:
- $ref: '#/components/schemas/InnerHits'
- type: array
items:
$ref: '#/components/schemas/InnerHits'
max_concurrent_group_searches:
description: The number of concurrent requests that are allowed to be retrieved by the `inner_hits` parameter per group.
type: integer
required:
- field
Highlight:
allOf:
- $ref: '#/components/schemas/HighlightBase'
- type: object
properties:
encoder:
$ref: '#/components/schemas/HighlighterEncoder'
fields:
type: object
additionalProperties:
$ref: '#/components/schemas/HighlightField'
required:
- fields
HighlighterEncoder:
type: string
enum:
- default
- html
HighlightField:
allOf:
- $ref: '#/components/schemas/HighlightBase'
- type: object
properties:
matched_fields:
$ref: '_common.yaml#/components/schemas/Fields'
analyzer:
$ref: '_common.analysis.yaml#/components/schemas/Analyzer'
HighlightBase:
type: object
properties:
type:
$ref: '#/components/schemas/HighlighterType'
boundary_chars:
description: A string that contains each boundary character.
type: string
boundary_max_scan:
description: How far to scan for boundary characters.
type: integer
format: int32
boundary_scanner:
$ref: '#/components/schemas/BoundaryScanner'
boundary_scanner_locale:
description: |-
Controls which locale is used to search for sentence and word boundaries.
This parameter takes the form of a language tag, for example, `"en-US"`, `"fr-FR"`, or `"ja-JP"`.
type: string
force_source:
deprecated: true
type: boolean
fragmenter:
$ref: '#/components/schemas/HighlighterFragmenter'
fragment_offset:
type: integer
format: int32
fragment_size:
description: The size of the highlighted fragment in characters.
type: integer
format: int32
highlight_filter:
type: boolean
highlight_query:
$ref: '_common.query_dsl.yaml#/components/schemas/QueryContainer'
max_fragment_length:
type: integer
format: int32
max_analyzer_offset:
description: |-
If set to a non-negative value, highlighting stops at this defined maximum limit.
The rest of the text is not processed or highlighted, and no error is returned.
The `max_analyzer_offset` query setting does not override the `index.highlight.max_analyzed_offset` setting, which takes precedence when it is set to a lower value than the query setting.
type: integer
format: int32
no_match_size:
description: The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.
type: integer
format: int32
number_of_fragments:
description: |-
The maximum number of fragments to return.
When the number of fragments is set to `0`, no fragments are returned.
Instead, the entirety of a field's contents are highlighted and returned.
This is useful when you need to highlight short texts, such as a title or address, in which fragmentation is not required.
If `number_of_fragments` is set to `0`, the `fragment_size` is ignored.
type: integer
format: int32
options:
type: object
additionalProperties:
type: object
order:
$ref: '#/components/schemas/HighlighterOrder'
phrase_limit:
description: |-
Controls the number of matching phrases in a document that are considered.
This prevents the `fvh` highlighter from analyzing too many phrases and consuming too much memory.
When using `matched_fields`, phrase-limited phrases per matched field are considered. Raising the limit increases the query time and consumes more memory.
This setting is only supported by the `fvh` highlighter.
type: integer
format: int32
post_tags:
description: |-
When used in conjunction with `pre_tags`, defines the HTML tags to use for the highlighted text.
By default, highlighted text is wrapped in `<em>` and `</em>` tags.
type: array
items:
type: string
pre_tags:
description: |-
When used in conjunction with `post_tags`, defines the HTML tags to use for the highlighted text.
By default, highlighted text is wrapped in `<em>` and `</em>` tags.
type: array
items:
type: string
require_field_match:
description: |-
By default, only fields that contains a query match are highlighted.
Set to `false` to highlight all fields.
type: boolean
tags_schema:
$ref: '#/components/schemas/HighlighterTagsSchema'
HighlighterType:
oneOf:
- title: builtin
$ref: '#/components/schemas/BuiltinHighlighterType'
- title: custom
type: string
BuiltinHighlighterType:
oneOf:
- type: string
const: plain
- title: fast_vector
type: string
const: fvh
- type: string
const: unified
BoundaryScanner:
type: string
enum:
- chars
- sentence
- word
HighlighterFragmenter:
type: string
enum:
- simple
- span
HighlighterOrder:
type: string
enum:
- score
HighlighterTagsSchema:
type: string
enum:
- styled
SourceConfig:
description: Defines how to fetch a source. Fetching can be disabled entirely, or the source can be filtered.
oneOf:
- title: fetch
type: boolean
- title: filter
$ref: '#/components/schemas/SourceFilter'
SourceFilter:
oneOf:
- title: includes
$ref: '_common.yaml#/components/schemas/Fields'
- type: object
properties:
excludes:
$ref: '_common.yaml#/components/schemas/Fields'
includes:
$ref: '_common.yaml#/components/schemas/Fields'
Rescore:
type: object
properties:
query:
$ref: '#/components/schemas/RescoreQuery'
window_size:
type: integer
format: int32
required:
- query
RescoreQuery:
type: object
properties:
rescore_query:
$ref: '_common.query_dsl.yaml#/components/schemas/QueryContainer'
query_weight:
description: The relative importance of the original query as compared to the rescore query.
type: number
format: float
rescore_query_weight:
description: The relative importance of the rescore query as compared to the original query.
type: number
format: float
score_mode:
$ref: '#/components/schemas/ScoreMode'
required:
- rescore_query
ScoreMode:
type: string
enum:
- avg
- max
- min
- multiply
- total
Suggester:
type: object
properties:
text:
description: The global suggest text, which avoids repetition when the same text is used in several suggesters.
type: string
PointInTimeReference:
type: object
properties:
id:
$ref: '_common.yaml#/components/schemas/Id'
keep_alive:
$ref: '_common.yaml#/components/schemas/Duration'
required:
- id
ResponseBody:
type: object
properties:
took:
type: integer
format: int64
timed_out:
type: boolean
_shards:
$ref: '_common.yaml#/components/schemas/ShardStatistics'
phase_took:
x-version-added: '2.12'
$ref: '_common.yaml#/components/schemas/PhaseTook'
hits:
$ref: '#/components/schemas/HitsMetadata'
aggregations:
type: object
additionalProperties:
$ref: '_common.aggregations.yaml#/components/schemas/Aggregate'
_clusters:
$ref: '_common.yaml#/components/schemas/ClusterStatistics'
fields:
type: object
additionalProperties:
type: object
max_score:
type: number
format: float
num_reduce_phases:
type: integer
format: int32
profile:
$ref: '#/components/schemas/Profile'
pit_id:
$ref: '_common.yaml#/components/schemas/Id'
_scroll_id:
$ref: '_common.yaml#/components/schemas/ScrollId'
suggest:
type: object
additionalProperties:
type: array
items:
$ref: '#/components/schemas/Suggest'
terminated_early:
type: boolean
required:
- _shards
- hits
- timed_out
- took