forked from opensearch-project/opensearch-api-specification
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch_relevance.yaml
More file actions
673 lines (670 loc) · 23.9 KB
/
search_relevance.yaml
File metadata and controls
673 lines (670 loc) · 23.9 KB
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
openapi: 3.1.0
info:
title: OpenSearch Search Relevance API
description: OpenSearch Search Relevance API.
version: 1.0.0
paths:
/_plugins/_search_relevance/query_sets:
get:
operationId: search_relevance.get_query_sets.0
x-operation-group: search_relevance.get_query_sets
x-version-added: '3.1'
description: Lists the current query sets available.
responses:
'200':
$ref: '#/components/responses/search_relevance.get_query_sets@200'
post:
operationId: search_relevance.post_query_sets.0
x-operation-group: search_relevance.post_query_sets
x-version-added: '3.1'
description: Creates a new query set by sampling queries from the user behavior data.
requestBody:
$ref: '#/components/requestBodies/search_relevance.post_query_sets'
responses:
'200':
$ref: '#/components/responses/search_relevance.post_query_sets@200'
put:
operationId: search_relevance.put_query_sets.0
x-operation-group: search_relevance.put_query_sets
x-version-added: '3.1'
description: Creates a new query set by uploading manually.
requestBody:
$ref: '#/components/requestBodies/search_relevance.put_query_sets'
responses:
'200':
$ref: '#/components/responses/search_relevance.put_query_sets@200'
/_plugins/_search_relevance/query_sets/{query_set_id}:
get:
operationId: search_relevance.get_query_sets.1
x-operation-group: search_relevance.get_query_sets
x-version-added: '3.1'
description: Lists the current query sets available.
parameters:
- $ref: '#/components/parameters/search_relevance.get_query_sets::path.query_set_id'
responses:
'200':
$ref: '#/components/responses/search_relevance.get_query_sets@200'
delete:
operationId: search_relevance.delete_query_sets.0
x-operation-group: search_relevance.delete_query_sets
x-version-added: '3.1'
description: Deletes a query set.
parameters:
- $ref: '#/components/parameters/search_relevance.delete_query_sets::path.query_set_id'
responses:
'200':
$ref: '#/components/responses/search_relevance.delete_query_sets@200'
/_plugins/_search_relevance/judgments:
get:
operationId: search_relevance.get_judgments.0
x-operation-group: search_relevance.get_judgments
x-version-added: '3.1'
description: Gets judgments.
responses:
'200':
$ref: '#/components/responses/search_relevance.get_judgments@200'
put:
operationId: search_relevance.put_judgments.0
x-operation-group: search_relevance.put_judgments
x-version-added: '3.1'
description: Creates a judgment.
requestBody:
description: The request body of the judgment to be created.
$ref: '#/components/requestBodies/search_relevance.put_judgments'
responses:
'200':
$ref: '#/components/responses/search_relevance.put_judgments@200'
/_plugins/_search_relevance/judgments/{judgment_id}:
get:
operationId: search_relevance.get_judgments.1
x-operation-group: search_relevance.get_judgments
x-version-added: '3.1'
description: Gets judgments.
parameters:
- $ref: '#/components/parameters/search_relevance.get_judgments::path.judgment_id'
responses:
'200':
$ref: '#/components/responses/search_relevance.get_judgments@200'
delete:
operationId: search_relevance.delete_judgments.0
x-operation-group: search_relevance.delete_judgments
x-version-added: '3.1'
description: Deletes a specified judgment.
parameters:
- $ref: '#/components/parameters/search_relevance.delete_judgments::path.judgment_id'
responses:
'200':
$ref: '#/components/responses/search_relevance.delete_judgments@200'
/_plugins/_search_relevance/search_configurations:
get:
operationId: search_relevance.get_search_configurations.0
x-operation-group: search_relevance.get_search_configurations
x-version-added: '3.1'
description: Gets the search configurations.
responses:
'200':
$ref: '#/components/responses/search_relevance.get_search_configurations@200'
put:
operationId: search_relevance.put_search_configurations.0
x-operation-group: search_relevance.put_search_configurations
x-version-added: '3.1'
description: Creates a search configuration.
requestBody:
$ref: '#/components/requestBodies/search_relevance.put_search_configurations'
responses:
'200':
$ref: '#/components/responses/search_relevance.put_search_configurations@200'
/_plugins/_search_relevance/search_configurations/{search_configuration_id}:
get:
operationId: search_relevance.get_search_configurations.1
x-operation-group: search_relevance.get_search_configurations
x-version-added: '3.1'
description: Gets the search configurations.
parameters:
- $ref: '#/components/parameters/search_relevance.get_search_configurations::path.search_configuration_id'
responses:
'200':
$ref: '#/components/responses/search_relevance.get_search_configurations@200'
delete:
operationId: search_relevance.delete_search_configurations.0
x-operation-group: search_relevance.delete_search_configurations
x-version-added: '3.1'
description: Deletes a specified search configuration.
parameters:
- $ref: '#/components/parameters/search_relevance.delete_search_configurations::path.search_configuration_id'
responses:
'200':
$ref: '#/components/responses/search_relevance.delete_search_configurations@200'
/_plugins/_search_relevance/experiments:
get:
operationId: search_relevance.get_experiments.0
x-operation-group: search_relevance.get_experiments
x-version-added: '3.1'
description: Gets experiments.
responses:
'200':
$ref: '#/components/responses/search_relevance.get_experiments@200'
put:
operationId: search_relevance.put_experiments.0
x-operation-group: search_relevance.put_experiments
x-version-added: '3.1'
description: Creates an experiment.
requestBody:
$ref: '#/components/requestBodies/search_relevance.put_experiments'
responses:
'200':
$ref: '#/components/responses/search_relevance.put_experiments@200'
/_plugins/_search_relevance/experiments/{experiment_id}:
get:
operationId: search_relevance.get_experiments.1
x-operation-group: search_relevance.get_experiments
x-version-added: '3.1'
description: Gets experiments.
parameters:
- $ref: '#/components/parameters/search_relevance.get_experiments::path.experiment_id'
responses:
'200':
$ref: '#/components/responses/search_relevance.get_experiments@200'
# content:
# application/json:
# schema:
# type: object
# $ref: '../schemas/search_relevance._common.yaml#/components/schemas/Experiment'
delete:
operationId: search_relevance.delete_experiments.0
x-operation-group: search_relevance.delete_experiments
x-version-added: '3.1'
description: Deletes a specified experiment.
parameters:
- $ref: '#/components/parameters/search_relevance.delete_experiments::path.experiment_id'
responses:
'200':
$ref: '#/components/responses/search_relevance.delete_experiments@200'
/_plugins/_search_relevance/{node_id}/stats:
get:
operationId: search_relevance.get_node_stats.0
x-operation-group: search_relevance.get_node_stats
x-version-added: '3.1'
description: Gets stats by node.
parameters:
- $ref: '#/components/parameters/search_relevance.get_node_stats::path.node_id'
- $ref: '#/components/parameters/search_relevance.get_node_stats::query.flat_stat_paths'
- $ref: '#/components/parameters/search_relevance.get_node_stats::query.include_all_nodes'
- $ref: '#/components/parameters/search_relevance.get_node_stats::query.include_individual_nodes'
- $ref: '#/components/parameters/search_relevance.get_node_stats::query.include_info'
- $ref: '#/components/parameters/search_relevance.get_node_stats::query.include_metadata'
responses:
'200':
$ref: '#/components/responses/search_relevance.get_node_stats@200'
/_plugins/_search_relevance/{node_id}/stats/{stat}:
get:
operationId: search_relevance.get_node_stats.1
x-operation-group: search_relevance.get_node_stats
x-version-added: '3.1'
description: Gets stats by node.
parameters:
- $ref: '#/components/parameters/search_relevance.get_node_stats::path.node_id'
- $ref: '#/components/parameters/search_relevance.get_node_stats::path.stat'
- $ref: '#/components/parameters/search_relevance.get_node_stats::query.flat_stat_paths'
- $ref: '#/components/parameters/search_relevance.get_node_stats::query.include_all_nodes'
- $ref: '#/components/parameters/search_relevance.get_node_stats::query.include_individual_nodes'
- $ref: '#/components/parameters/search_relevance.get_node_stats::query.include_info'
- $ref: '#/components/parameters/search_relevance.get_node_stats::query.include_metadata'
responses:
'200':
$ref: '#/components/responses/search_relevance.get_node_stats@200'
/_plugins/_search_relevance/stats:
get:
operationId: search_relevance.get_stats.0
x-operation-group: search_relevance.get_stats
x-version-added: '3.1'
description: Gets stats.
parameters:
- $ref: '#/components/parameters/search_relevance.get_stats::query.flat_stat_paths'
- $ref: '#/components/parameters/search_relevance.get_stats::query.include_all_nodes'
- $ref: '#/components/parameters/search_relevance.get_stats::query.include_individual_nodes'
- $ref: '#/components/parameters/search_relevance.get_stats::query.include_info'
- $ref: '#/components/parameters/search_relevance.get_stats::query.include_metadata'
responses:
'200':
$ref: '#/components/responses/search_relevance.get_stats@200'
/_plugins/_search_relevance/stats/{stat}:
get:
operationId: search_relevance.get_stats.1
x-operation-group: search_relevance.get_stats
x-version-added: '3.1'
description: Gets stats.
parameters:
- $ref: '#/components/parameters/search_relevance.get_stats::path.stat'
- $ref: '#/components/parameters/search_relevance.get_stats::query.flat_stat_paths'
- $ref: '#/components/parameters/search_relevance.get_stats::query.include_all_nodes'
- $ref: '#/components/parameters/search_relevance.get_stats::query.include_individual_nodes'
- $ref: '#/components/parameters/search_relevance.get_stats::query.include_info'
- $ref: '#/components/parameters/search_relevance.get_stats::query.include_metadata'
responses:
'200':
$ref: '#/components/responses/search_relevance.get_stats@200'
components:
parameters:
search_relevance.get_query_sets::path.query_set_id:
name: query_set_id
in: path
required: true
description: The query set id
schema:
type: string
search_relevance.delete_query_sets::path.query_set_id:
name: query_set_id
in: path
required: true
description: The query set id
schema:
type: string
search_relevance.get_judgments::path.judgment_id:
name: judgment_id
in: path
required: true
description: The judgment id
schema:
type:
string
search_relevance.delete_judgments::path.judgment_id:
name: judgment_id
in: path
required: true
description: The judgment id
schema:
type:
string
search_relevance.get_search_configurations::path.search_configuration_id:
name: search_configuration_id
in: path
required: true
description: The search configuration id
schema:
type:
string
search_relevance.delete_search_configurations::path.search_configuration_id:
name: search_configuration_id
in: path
required: true
description: The search configuration id
schema:
type:
string
search_relevance.get_experiments::path.experiment_id:
name: experiment_id
in: path
required: true
description: The experiment id
schema:
type:
string
search_relevance.delete_experiments::path.experiment_id:
name: experiment_id
in: path
required: true
description: The experiment id
schema:
type:
string
search_relevance.get_node_stats::path.node_id:
name: node_id
in: path
required: true
description: The node id
schema:
type:
string
search_relevance.get_node_stats::path.stat:
name: stat
in: path
required: true
description: The statistic to return
schema:
type:
string
search_relevance.get_stats::path.stat:
name: stat
in: path
required: true
description: The statistic to return
schema:
type:
string
search_relevance.get_node_stats::query.flat_stat_paths:
name: flat_stat_paths
in: query
required: false
description: Requests flattened stat paths as keys
schema:
type:
string
search_relevance.get_node_stats::query.include_metadata:
name: include_metadata
in: query
required: false
description: Whether to include metadata
schema:
type:
string
search_relevance.get_node_stats::query.include_individual_nodes:
name: include_individual_nodes
in: query
required: false
description: Whether to include individual nodes
schema:
type:
string
search_relevance.get_node_stats::query.include_all_nodes:
name: include_all_nodes
in: query
required: false
description: Whether to include all nodes
schema:
type:
string
search_relevance.get_node_stats::query.include_info:
name: include_info
in: query
required: false
description: Whether to include info
schema:
type:
string
search_relevance.get_stats::query.flat_stat_paths:
name: flat_stat_paths
in: query
required: false
description: Requests flattened stat paths as keys
schema:
type:
string
search_relevance.get_stats::query.include_metadata:
name: include_metadata
in: query
required: false
description: Whether to include metadata
schema:
type:
string
search_relevance.get_stats::query.include_individual_nodes:
name: include_individual_nodes
in: query
required: false
description: Whether to include individual nodes
schema:
type:
string
search_relevance.get_stats::query.include_all_nodes:
name: include_all_nodes
in: query
required: false
description: Whether to include all nodes
schema:
type:
string
search_relevance.get_stats::query.include_info:
name: include_info
in: query
required: false
description: Whether to include info
schema:
type:
string
requestBodies:
search_relevance.post_query_sets:
content:
application/json:
schema:
type: object
properties:
name:
type: string
description:
type: string
sampling:
type: string
querySetSize:
type: integer
search_relevance.put_query_sets:
content:
application/json:
schema:
type: object
properties:
name:
type: string
description:
type: string
sampling:
type: string
querySetQueries:
type: array
items:
type: object
# TODO: Replace the object type with the actual querySet
# schema.
search_relevance.put_judgments:
content:
application/json:
schema:
oneOf:
- type: object
description: The schema for a LLM judgment
properties:
name:
type: string
description:
type: string
type:
type: string
modelId:
type: string
querySetId:
type: string
searchConfigurationList:
type: array
items:
type: string
size:
type: integer
ignoreFailure:
type: boolean
contextFields:
type: array
items:
type: string
- type: object
description: The schema for a UBI judgment
properties:
name:
type: string
description:
type: string
type:
type: string
clickModel:
type: string
maxRank:
type: integer
- type: object
description: The schema for an import judgment
properties:
name:
type: string
description:
type: string
type:
type: string
judgmentRatings:
type: array
items:
type: object
search_relevance.put_search_configurations:
content:
application/json:
schema:
type: object
properties:
name:
type: string
index:
type: string
query:
type: string
searchPipeline:
type: string
search_relevance.put_experiments:
content:
application/json:
schema:
anyOf:
- type: object
description: The schema for a pointwise and hybrid optimizer experiment
properties:
querySetId:
type: string
searchConfigurationList:
type: array
items:
type: string
judgmentList:
type: array
items:
type: string
size:
type: integer
type:
type: string
- type: object
description: The schema for a pairwise experiment
properties:
querySetId:
type: string
searchConfigurationList:
type: array
items:
type: string
size:
type: integer
type:
type: string
responses:
search_relevance.get_query_sets@200:
content:
application/json:
schema:
oneOf:
- $ref: '../schemas/search_relevance._common.yaml#/components/schemas/QuerySet'
# TODO: Right Now, the generic object is the response of a get, but this can
# be more fleshed out to accomodate the specific return values of different gets.
- $ref: '../schemas/search_relevance._common.yaml#/components/schemas/GenericObject'
search_relevance.post_query_sets@200:
content:
application/json:
schema:
type: object
properties:
query_set_id:
type: string
query_set_result:
type: string
search_relevance.put_query_sets@200:
content:
application/json:
schema:
type: object
properties:
query_set_id:
type: string
query_set_result:
type: string
search_relevance.delete_query_sets@200:
content:
application/json:
schema:
type: object
# TODO: The return value of deletes can be more specific.
search_relevance.get_judgments@200:
content:
application/json:
schema:
oneOf:
- $ref: '../schemas/search_relevance._common.yaml#/components/schemas/Judgment'
# TODO: Right Now, the generic object is the response of a get, but this can
# be more fleshed out to accomodate the specific return values of different gets.
- $ref: '../schemas/search_relevance._common.yaml#/components/schemas/GenericObject'
search_relevance.put_judgments@200:
content:
application/json:
schema:
type:
object
properties:
judgment_id:
type: string
search_relevance.delete_judgments@200:
content:
application/json:
schema:
type: object
# TODO: The return value of deletes can be more specific.
search_relevance.get_search_configurations@200:
content:
application/json:
schema:
oneOf:
- $ref: '../schemas/search_relevance._common.yaml#/components/schemas/SearchConfiguration'
# TODO: Right Now, the generic object is the response of a get, but this can
# be more fleshed out to accomodate the specific return values of different gets.
- $ref: '../schemas/search_relevance._common.yaml#/components/schemas/GenericObject'
search_relevance.put_search_configurations@200:
content:
application/json:
schema:
type: object
properties:
search_configuration_id:
type: string
search_configuration_result:
type: string
search_relevance.delete_search_configurations@200:
content:
application/json:
schema:
type: object
# TODO: The return value of deletes can be more specific.
search_relevance.get_experiments@200:
content:
application/json:
schema:
oneOf:
- $ref: '../schemas/search_relevance._common.yaml#/components/schemas/Experiment'
# TODO: Right Now, the generic object is the response of a get, but this can
# be more fleshed out to accomodate the specific return values of different gets.
- $ref: '../schemas/search_relevance._common.yaml#/components/schemas/GenericObject'
search_relevance.put_experiments@200:
content:
application/json:
schema:
type: object
# TODO: The return value of puts can be more specific.
search_relevance.delete_experiments@200:
content:
application/json:
schema:
type: object
# TODO: The return value of deletes can be more specific.
search_relevance.get_node_stats@200:
content:
application/json:
schema:
type: object
# TODO: The return value of get node stats can be more specific.
search_relevance.get_stats@200:
content:
application/json:
schema:
type: object
# TODO: The return value of get stats should be more specific.