-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathai-search-api-spec.yaml
1639 lines (1639 loc) · 71.4 KB
/
ai-search-api-spec.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.0.1
info:
title: Azure Search Index
description: 'Client that can be used to query an index and upload, merge, or delete documents.'
version: '1.0'
servers:
- url: https://REPLACED-BY-POLICY/ai-search
paths:
'/indexes/{index-name}/docs/$count':
get:
tags:
- Documents
summary: Documents_Count
description: Queries the number of documents in the index.
operationId: Documents_Count
parameters:
- name: index-name
in: path
required: true
schema:
enum:
- product-info
type: string
default: product-info
- name: api-version
in: query
description: Client Api Version.
required: true
schema:
enum:
- '2023-11-01'
type: string
default: '2023-11-01'
- name: x-ms-client-request-id
in: header
description: Format - uuid. The tracking ID sent with the request to help with debugging.
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Docs-countGet200ApplicationJsonResponse'
example: 0
'500':
description: Error response.
content:
application/json:
schema:
$ref: '#/components/schemas/SearchError'
'/indexes(''{index-name}'')/docs':
get:
tags:
- Documents
summary: Documents_SearchGet
description: Searches for documents in the index.
operationId: Documents_SearchGet
parameters:
- name: index-name
in: path
required: true
schema:
enum:
- product-info
type: string
default: product-info
- name: api-version
in: query
required: true
schema:
enum:
- 2023-10-01-Preview
- '2023-11-01'
type: string
default: '2023-11-01'
- name: search
in: query
description: A full-text search query expression; Use "*" or omit this parameter to match all documents.
schema:
type: string
- name: $count
in: query
description: A value that specifies whether to fetch the total count of results. Default is false. Setting this value to true may have a performance impact. Note that the count returned is an approximation.
schema:
type: boolean
- name: facet
in: query
description: 'The list of facet expressions to apply to the search query. Each facet expression contains a field name, optionally followed by a comma-separated list of name:value pairs.'
schema:
type: array
items:
type: string
- name: $filter
in: query
description: The OData $filter expression to apply to the search query.
schema:
type: string
- name: highlight
in: query
description: The list of field names to use for hit highlights. Only searchable fields can be used for hit highlighting.
schema:
type: array
items:
type: string
- name: highlightPostTag
in: query
description: A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is </em>.
schema:
type: string
- name: highlightPreTag
in: query
description: A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default is <em>.
schema:
type: string
- name: minimumCoverage
in: query
description: Format - double. Format - double. A number between 0 and 100 indicating the percentage of the index that must be covered by a search query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 100.
schema:
type: number
format: double
- name: $orderby
in: query
description: 'The list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, and desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no OrderBy is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses.'
schema:
type: array
items:
type: string
- name: queryType
in: query
description: A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax.
schema:
enum:
- simple
- full
- semantic
type: string
- name: scoringParameter
in: query
description: 'The list of parameter values to be used in scoring functions (for example, referencePointParameter) using the format name-values. For example, if the scoring profile defines a function with a parameter called ''mylocation'' the parameter string would be "mylocation--122.2,44.8" (without the quotes).'
schema:
type: array
items:
type: string
- name: scoringProfile
in: query
description: The name of a scoring profile to evaluate match scores for matching documents in order to sort the results.
schema:
type: string
- name: searchFields
in: query
description: 'The list of field names to which to scope the full-text search. When using fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each fielded search expression take precedence over any field names listed in this parameter.'
schema:
type: array
items:
type: string
- name: searchMode
in: query
description: A value that specifies whether any or all of the search terms must be matched in order to count the document as a match.
schema:
enum:
- any
- all
type: string
- name: scoringStatistics
in: query
description: 'A value that specifies whether we want to calculate scoring statistics (such as document frequency) globally for more consistent scoring, or locally, for lower latency.'
schema:
enum:
- local
- global
type: string
- name: sessionId
in: query
description: 'A value to be used to create a sticky session, which can help to get more consistent results. As long as the same sessionId is used, a best-effort attempt will be made to target the same replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the load balancing of the requests across replicas and adversely affect the performance of the search service. The value used as sessionId cannot start with a ''_'' character.'
schema:
type: string
- name: $select
in: query
description: 'The list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included.'
schema:
type: array
items:
type: string
- name: $skip
in: query
description: 'Format - int32. Format - int32. The number of search results to skip. This value cannot be greater than 100,000. If you need to scan documents in sequence, but cannot use $skip due to this limitation, consider using $orderby on a totally-ordered key and $filter with a range query instead.'
schema:
type: integer
format: int32
- name: $top
in: query
description: 'Format - int32. Format - int32. The number of search results to retrieve. This can be used in conjunction with $skip to implement client-side paging of search results. If results are truncated due to server-side paging, the response will include a continuation token that can be used to issue another Search request for the next page of results.'
schema:
type: integer
format: int32
- name: semanticConfiguration
in: query
description: 'The name of the semantic configuration that lists which fields should be used for semantic ranking, captions, highlights, and answers'
schema:
type: string
- name: semanticErrorHandling
in: query
description: 'Allows the user to choose whether a semantic call should fail completely, or to return partial results.'
schema:
enum:
- partial
- fail
type: string
- name: semanticMaxWaitInMilliseconds
in: query
description: Format - int32. Format - int32. Allows the user to set an upper bound on the amount of time it takes for semantic enrichment to finish processing before the request fails.
schema:
minimum: 700
type: integer
format: int32
- name: answers
in: query
description: 'This parameter is only valid if the query type is `semantic`. If set, the query returns answers extracted from key passages in the highest ranked documents. The number of answers returned can be configured by appending the pipe character `|` followed by the `count-<number of answers>` option after the answers parameter value, such as `extractive|count-3`. Default count is 1. The confidence threshold can be configured by appending the pipe character `|` followed by the `threshold-<confidence threshold>` option after the answers parameter value, such as `extractive|threshold-0.9`. Default threshold is 0.7.'
schema:
enum:
- none
- extractive
type: string
- name: captions
in: query
description: 'This parameter is only valid if the query type is `semantic`. If set, the query returns captions extracted from key passages in the highest ranked documents. When Captions is set to `extractive`, highlighting is enabled by default, and can be configured by appending the pipe character `|` followed by the `highlight-<true/false>` option, such as `extractive|highlight-true`. Defaults to `None`.'
schema:
enum:
- none
- extractive
type: string
- name: x-ms-client-request-id
in: header
description: Format - uuid. The tracking ID sent with the request to help with debugging.
schema:
type: string
responses:
'200':
description: Response containing documents that match the search criteria.
content:
application/json:
schema:
$ref: '#/components/schemas/SearchDocumentsResult'
example:
'@odata.count': 0
'@search.coverage': 0
'@search.facets': { }
'@search.answers':
- score: 0
key: string
text: string
highlights: string
'@search.nextPageParameters':
count: true
facets:
- string
filter: string
highlight: string
highlightPostTag: string
highlightPreTag: string
minimumCoverage: 0
orderby: string
queryType: simple
scoringStatistics: local
sessionId: string
scoringParameters:
- string
scoringProfile: string
search: string
searchFields: string
searchMode: any
select: string
skip: 0
top: 0
semanticConfiguration: string
semanticErrorHandling: partial
semanticMaxWaitInMilliseconds: 0
answers: none
captions: none
vectorQueries:
- kind: vector
k: 0
fields: string
exhaustive: true
vectorFilterMode: postFilter
value:
- '@search.score': 0
'@search.rerankerScore': 0
'@search.highlights': { }
'@search.captions':
- text: string
highlights: string
'@odata.nextLink': string
'@search.semanticPartialResponseReason': maxWaitExceeded
'@search.semanticPartialResponseType': baseResults
'500':
description: Error response.
content:
application/json:
schema:
$ref: '#/components/schemas/SearchError'
'/indexes(''{index-name}'')/docs/search.post.search':
post:
tags:
- Documents
summary: Documents_SearchPost
description: Searches for documents in the index.
operationId: Documents_SearchPost
parameters:
- name: index-name
in: path
required: true
schema:
type: ''
- name: api-version
in: query
description: Client Api Version.
required: true
schema:
type: string
- name: x-ms-client-request-id
in: header
description: Format - uuid. Format - uuid. The tracking ID sent with the request to help with debugging.
schema:
type: string
requestBody:
description: The definition of the Search request.
content:
application/json:
schema:
$ref: '#/components/schemas/SearchRequest'
example:
count: true
facets:
- string
filter: string
highlight: string
highlightPostTag: string
highlightPreTag: string
minimumCoverage: 0
orderby: string
queryType: simple
scoringStatistics: local
sessionId: string
scoringParameters:
- string
scoringProfile: string
search: string
searchFields: string
searchMode: any
select: string
skip: 0
top: 0
semanticConfiguration: string
semanticErrorHandling: partial
semanticMaxWaitInMilliseconds: 0
answers: none
captions: none
vectorQueries:
- kind: vector
k: 0
fields: string
exhaustive: true
vectorFilterMode: postFilter
responses:
'200':
description: Response containing documents that match the search criteria.
content:
application/json:
schema:
$ref: '#/components/schemas/SearchDocumentsResult'
example:
'@odata.count': 0
'@search.coverage': 0
'@search.facets': { }
'@search.answers':
- score: 0
key: string
text: string
highlights: string
'@search.nextPageParameters':
count: true
facets:
- string
filter: string
highlight: string
highlightPostTag: string
highlightPreTag: string
minimumCoverage: 0
orderby: string
queryType: simple
scoringStatistics: local
sessionId: string
scoringParameters:
- string
scoringProfile: string
search: string
searchFields: string
searchMode: any
select: string
skip: 0
top: 0
semanticConfiguration: string
semanticErrorHandling: partial
semanticMaxWaitInMilliseconds: 0
answers: none
captions: none
vectorQueries:
- kind: vector
k: 0
fields: string
exhaustive: true
vectorFilterMode: postFilter
value:
- '@search.score': 0
'@search.rerankerScore': 0
'@search.highlights': { }
'@search.captions':
- text: string
highlights: string
'@odata.nextLink': string
'@search.semanticPartialResponseReason': maxWaitExceeded
'@search.semanticPartialResponseType': baseResults
'500':
description: Error response.
content:
application/json:
schema:
$ref: '#/components/schemas/SearchError'
'/indexes(''{index-name}'')/docs(''{key}'')':
get:
tags:
- Documents
summary: Documents_Get
description: Retrieves a document from the index.
operationId: Documents_Get
parameters:
- name: index-name
in: path
required: true
schema:
type: ''
- name: key
in: path
description: The key of the document to retrieve.
required: true
schema:
type: string
- name: api-version
in: query
description: Client Api Version.
required: true
schema:
type: string
- name: $select
in: query
description: List of field names to retrieve for the document; Any field not retrieved will be missing from the returned document.
schema:
type: array
items:
type: string
- name: x-ms-client-request-id
in: header
description: Format - uuid. Format - uuid. The tracking ID sent with the request to help with debugging.
schema:
type: string
responses:
'200':
description: Response containing the requested document.
content:
application/json:
schema:
$ref: '#/components/schemas/LookupDocument'
'500':
description: Error response.
content:
application/json:
schema:
$ref: '#/components/schemas/SearchError'
'/indexes(''{index-name}'')/docs/search.suggest':
get:
tags:
- Documents
summary: Documents_SuggestGet
description: Suggests documents in the index that match the given partial query text.
operationId: Documents_SuggestGet
parameters:
- name: index-name
in: path
required: true
schema:
type: ''
- name: search
in: query
description: 'The search text to use to suggest documents. Must be at least 1 character, and no more than 100 characters.'
required: true
schema:
type: string
- name: suggesterName
in: query
description: The name of the suggester as specified in the suggesters collection that's part of the index definition.
required: true
schema:
type: string
- name: api-version
in: query
description: Client Api Version.
required: true
schema:
type: string
- name: $filter
in: query
description: An OData expression that filters the documents considered for suggestions.
schema:
type: string
- name: fuzzy
in: query
description: 'A value indicating whether to use fuzzy matching for the suggestions query. Default is false. When set to true, the query will find terms even if there''s a substituted or missing character in the search text. While this provides a better experience in some scenarios, it comes at a performance cost as fuzzy suggestions queries are slower and consume more resources.'
schema:
type: boolean
- name: highlightPostTag
in: query
description: 'A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting of suggestions is disabled.'
schema:
type: string
- name: highlightPreTag
in: query
description: 'A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting of suggestions is disabled.'
schema:
type: string
- name: minimumCoverage
in: query
description: Format - double. Format - double. A number between 0 and 100 indicating the percentage of the index that must be covered by a suggestions query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80.
schema:
type: number
format: double
- name: $orderby
in: query
description: 'The list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, or desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no $orderby is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses.'
schema:
type: array
items:
type: string
- name: searchFields
in: query
description: The list of field names to search for the specified search text. Target fields must be included in the specified suggester.
schema:
type: array
items:
type: string
- name: $select
in: query
description: 'The list of fields to retrieve. If unspecified, only the key field will be included in the results.'
schema:
type: array
items:
type: string
- name: $top
in: query
description: Format - int32. Format - int32. The number of suggestions to retrieve. The value must be a number between 1 and 100. The default is 5.
schema:
type: integer
format: int32
- name: x-ms-client-request-id
in: header
description: Format - uuid. Format - uuid. The tracking ID sent with the request to help with debugging.
schema:
type: string
responses:
'200':
description: Response containing suggested documents that match the partial input.
content:
application/json:
schema:
$ref: '#/components/schemas/SuggestDocumentsResult'
example:
value:
- '@search.text': string
'@search.coverage': 0
'500':
description: Error response.
content:
application/json:
schema:
$ref: '#/components/schemas/SearchError'
'/indexes(''{index-name}'')/docs/search.post.suggest':
post:
tags:
- Documents
summary: Documents_SuggestPost
description: Suggests documents in the index that match the given partial query text.
operationId: Documents_SuggestPost
parameters:
- name: index-name
in: path
required: true
schema:
type: ''
- name: api-version
in: query
description: Client Api Version.
required: true
schema:
type: string
- name: x-ms-client-request-id
in: header
description: Format - uuid. Format - uuid. The tracking ID sent with the request to help with debugging.
schema:
type: string
requestBody:
description: The Suggest request.
content:
application/json:
schema:
$ref: '#/components/schemas/SuggestRequest'
example:
filter: string
fuzzy: true
highlightPostTag: string
highlightPreTag: string
minimumCoverage: 0
orderby: string
search: string
searchFields: string
select: string
suggesterName: string
top: 0
responses:
'200':
description: Response containing suggested documents that match the partial input.
content:
application/json:
schema:
$ref: '#/components/schemas/SuggestDocumentsResult'
example:
value:
- '@search.text': string
'@search.coverage': 0
'500':
description: Error response.
content:
application/json:
schema:
$ref: '#/components/schemas/SearchError'
'/indexes(''{index-name}'')/docs/search.index':
post:
tags:
- Documents
summary: Documents_Index
description: Sends a batch of document write actions to the index.
operationId: Documents_Index
parameters:
- name: index-name
in: path
required: true
schema:
type: ''
- name: api-version
in: query
description: Client Api Version.
required: true
schema:
type: string
- name: x-ms-client-request-id
in: header
description: Format - uuid. Format - uuid. The tracking ID sent with the request to help with debugging.
schema:
type: string
requestBody:
description: The batch of index actions.
content:
application/json:
schema:
$ref: '#/components/schemas/IndexBatch'
example:
value:
- '@search.action': upload
responses:
'200':
description: Response containing the status of operations for all actions in the batch.
content:
application/json:
schema:
$ref: '#/components/schemas/IndexDocumentsResult'
example:
value:
- key: string
errorMessage: string
status: true
statusCode: 0
'207':
description: Response containing the status of operations for all actions in the batch.
content:
application/json:
schema:
$ref: '#/components/schemas/IndexDocumentsResult'
example:
value:
- key: string
errorMessage: string
status: true
statusCode: 0
'500':
description: Error response.
content:
application/json:
schema:
$ref: '#/components/schemas/SearchError'
'/indexes(''{index-name}'')/docs/search.autocomplete':
get:
tags:
- Documents
summary: Documents_AutocompleteGet
description: Autocompletes incomplete query terms based on input text and matching terms in the index.
operationId: Documents_AutocompleteGet
parameters:
- name: index-name
in: path
required: true
schema:
type: ''
- name: api-version
in: query
description: Client Api Version.
required: true
schema:
type: string
- name: search
in: query
description: The incomplete term which should be auto-completed.
required: true
schema:
type: string
- name: suggesterName
in: query
description: The name of the suggester as specified in the suggesters collection that's part of the index definition.
required: true
schema:
type: string
- name: autocompleteMode
in: query
description: Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles and 'oneTermWithContext' to use the current context while producing auto-completed terms.
schema:
enum:
- oneTerm
- twoTerms
- oneTermWithContext
type: string
- name: $filter
in: query
description: An OData expression that filters the documents used to produce completed terms for the Autocomplete result.
schema:
type: string
- name: fuzzy
in: query
description: 'A value indicating whether to use fuzzy matching for the autocomplete query. Default is false. When set to true, the query will find terms even if there''s a substituted or missing character in the search text. While this provides a better experience in some scenarios, it comes at a performance cost as fuzzy autocomplete queries are slower and consume more resources.'
schema:
type: boolean
- name: highlightPostTag
in: query
description: 'A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting is disabled.'
schema:
type: string
- name: highlightPreTag
in: query
description: 'A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting is disabled.'
schema:
type: string
- name: minimumCoverage
in: query
description: Format - double. Format - double. A number between 0 and 100 indicating the percentage of the index that must be covered by an autocomplete query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80.
schema:
type: number
format: double
- name: searchFields
in: query
description: The list of field names to consider when querying for auto-completed terms. Target fields must be included in the specified suggester.
schema:
type: array
items:
type: string
- name: $top
in: query
description: Format - int32. Format - int32. The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The default is 5.
schema:
type: integer
format: int32
- name: x-ms-client-request-id
in: header
description: Format - uuid. Format - uuid. The tracking ID sent with the request to help with debugging.
schema:
type: string
responses:
'200':
description: Response containing suggested query terms that complete the partial input.
content:
application/json:
schema:
$ref: '#/components/schemas/AutocompleteResult'
example:
'@search.coverage': 0
value:
- text: string
queryPlusText: string
'500':
description: Error response.
content:
application/json:
schema:
$ref: '#/components/schemas/SearchError'
'/indexes(''{index-name}'')/docs/search.post.autocomplete':
post:
tags:
- Documents
summary: Documents_AutocompletePost
description: Autocompletes incomplete query terms based on input text and matching terms in the index.
operationId: Documents_AutocompletePost
parameters:
- name: index-name
in: path
required: true
schema:
type: ''
- name: api-version
in: query
description: Client Api Version.
required: true
schema:
type: string
- name: x-ms-client-request-id
in: header
description: Format - uuid. Format - uuid. The tracking ID sent with the request to help with debugging.
schema:
type: string
requestBody:
description: The definition of the Autocomplete request.
content:
application/json:
schema:
$ref: '#/components/schemas/AutocompleteRequest'
example:
search: string
autocompleteMode: oneTerm
filter: string
fuzzy: true
highlightPostTag: string
highlightPreTag: string
minimumCoverage: 0
searchFields: string
suggesterName: string
top: 0
responses:
'200':
description: Response containing suggested query terms that complete the partial input.
content:
application/json:
schema:
$ref: '#/components/schemas/AutocompleteResult'
example:
'@search.coverage': 0
value:
- text: string
queryPlusText: string
'500':
description: Error response.
content:
application/json:
schema:
$ref: '#/components/schemas/SearchError'
components:
schemas:
SuggestDocumentsResult:
required:
- value
properties:
value:
type: array
items:
$ref: '#/components/schemas/SuggestResult'
description: The sequence of results returned by the query.
readOnly: true
x-ms-client-name: Results
'@search.coverage':
type: number
description: 'A value indicating the percentage of the index that was included in the query, or null if minimumCoverage was not set in the request.'
format: double
readOnly: true
x-ms-client-name: Coverage
description: Response containing suggestion query results from an index.
SuggestResult:
required:
- '@search.text'
properties:
'@search.text':
type: string
description: The text of the suggestion result.
readOnly: true
x-ms-client-name: Text
description: 'A result containing a document found by a suggestion query, plus associated metadata.'
FacetResult:
properties:
count:
type: integer
description: The approximate count of documents falling within the bucket described by this facet.
format: int64
readOnly: true
description: A single bucket of a facet query result. Reports the number of documents with a field value falling within a particular range or having a particular value or interval.
SearchDocumentsResult:
required:
- value
properties:
'@odata.count':
type: integer
description: 'The total count of results found by the search operation, or null if the count was not requested. If present, the count may be greater than the number of results in this response. This can happen if you use the $top or $skip parameters, or if the query can''t return all the requested documents in a single response.'
format: int64
readOnly: true
x-ms-client-name: Count
'@search.coverage':
type: number
description: 'A value indicating the percentage of the index that was included in the query, or null if minimumCoverage was not specified in the request.'
format: double
readOnly: true
x-ms-client-name: Coverage
'@search.facets':
type: object
additionalProperties:
type: array
items:
$ref: '#/components/schemas/FacetResult'
description: 'The facet query results for the search operation, organized as a collection of buckets for each faceted field; null if the query did not include any facet expressions.'
readOnly: true
x-ms-client-name: Facets
'@search.answers':
type: array
items:
$ref: '#/components/schemas/AnswerResult'
description: The answers query results for the search operation; null if the answers query parameter was not specified or set to 'none'.
readOnly: true
x-ms-client-name: Answers
x-nullable: true
'@search.nextPageParameters':
$ref: '#/components/schemas/SearchRequest'
value:
type: array
items:
$ref: '#/components/schemas/SearchResult'
description: The sequence of results returned by the query.
readOnly: true
x-ms-client-name: Results
'@odata.nextLink':
type: string
description: Continuation URL returned when the query can't return all the requested results in a single response. You can use this URL to formulate another GET or POST Search request to get the next part of the search response. Make sure to use the same verb (GET or POST) as the request that produced this response.
readOnly: true
x-ms-client-name: NextLink
'@search.semanticPartialResponseReason':
$ref: '#/components/schemas/SemanticPartialResponseReason'
'@search.semanticPartialResponseType':
$ref: '#/components/schemas/SemanticPartialResponseType'
description: Response containing search results from an index.
SearchResult:
required:
- '@search.score'
properties:
'@search.score':
type: number
description: The relevance score of the document compared to other documents returned by the query.
format: double
readOnly: true
x-ms-client-name: Score
x-nullable: false
'@search.rerankerScore':
type: number
description: The relevance score computed by the semantic ranker for the top search results. Search results are sorted by the RerankerScore first and then by the Score. RerankerScore is only returned for queries of type `semantic`.
format: double
readOnly: true
x-ms-client-name: RerankerScore
x-nullable: true
'@search.highlights':
type: object
additionalProperties:
type: array
items:
type: string
description: 'Text fragments from the document that indicate the matching search terms, organized by each applicable field; null if hit highlighting was not enabled for the query.'
readOnly: true
x-ms-client-name: Highlights
'@search.captions':
type: array
items:
$ref: '#/components/schemas/CaptionResult'
description: Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type `semantic`.
readOnly: true
x-ms-client-name: Captions
x-nullable: true
description: 'Contains a document found by a search query, plus associated metadata.'
LookupDocument:
type: object
description: A document retrieved via a document lookup operation.