@azure/search-documents 12.0.0-alpha.20230622.2 → 12.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -15
- package/dist/index.js +589 -99
- package/dist/index.js.map +1 -1
- package/dist-esm/src/generated/data/models/index.js +50 -6
- package/dist-esm/src/generated/data/models/index.js.map +1 -1
- package/dist-esm/src/generated/data/models/mappers.js +202 -0
- package/dist-esm/src/generated/data/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/data/models/parameters.js +30 -0
- package/dist-esm/src/generated/data/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/data/operations/documents.js +3 -0
- package/dist-esm/src/generated/data/operations/documents.js.map +1 -1
- package/dist-esm/src/generated/data/searchClient.js.map +1 -1
- package/dist-esm/src/generated/service/models/index.js +15 -14
- package/dist-esm/src/generated/service/models/index.js.map +1 -1
- package/dist-esm/src/generated/service/models/mappers.js +190 -7
- package/dist-esm/src/generated/service/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/service/searchServiceClient.js.map +1 -1
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/indexModels.js.map +1 -1
- package/dist-esm/src/searchClient.js +51 -46
- package/dist-esm/src/searchClient.js.map +1 -1
- package/dist-esm/src/searchIndexClient.js +1 -1
- package/dist-esm/src/searchIndexClient.js.map +1 -1
- package/dist-esm/src/searchIndexingBufferedSender.js.map +1 -1
- package/dist-esm/src/serviceModels.js.map +1 -1
- package/dist-esm/src/serviceUtils.js +39 -26
- package/dist-esm/src/serviceUtils.js.map +1 -1
- package/package.json +5 -4
- package/types/search-documents.d.ts +469 -110
package/dist/index.js
CHANGED
|
@@ -134,6 +134,20 @@ const SearchDocumentsResult = {
|
|
|
134
134
|
className: "SearchRequest"
|
|
135
135
|
}
|
|
136
136
|
},
|
|
137
|
+
semanticPartialResponseReason: {
|
|
138
|
+
serializedName: "@search\\.semanticPartialResponseReason",
|
|
139
|
+
readOnly: true,
|
|
140
|
+
type: {
|
|
141
|
+
name: "String"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
semanticPartialResponseType: {
|
|
145
|
+
serializedName: "@search\\.semanticPartialResponseType",
|
|
146
|
+
readOnly: true,
|
|
147
|
+
type: {
|
|
148
|
+
name: "String"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
137
151
|
results: {
|
|
138
152
|
serializedName: "value",
|
|
139
153
|
required: true,
|
|
@@ -316,6 +330,28 @@ const SearchRequest = {
|
|
|
316
330
|
name: "String"
|
|
317
331
|
}
|
|
318
332
|
},
|
|
333
|
+
semanticErrorHandling: {
|
|
334
|
+
serializedName: "semanticErrorHandling",
|
|
335
|
+
type: {
|
|
336
|
+
name: "String"
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
semanticMaxWaitInMilliseconds: {
|
|
340
|
+
constraints: {
|
|
341
|
+
InclusiveMinimum: 700
|
|
342
|
+
},
|
|
343
|
+
serializedName: "semanticMaxWaitInMilliseconds",
|
|
344
|
+
nullable: true,
|
|
345
|
+
type: {
|
|
346
|
+
name: "Number"
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
debug: {
|
|
350
|
+
serializedName: "debug",
|
|
351
|
+
type: {
|
|
352
|
+
name: "String"
|
|
353
|
+
}
|
|
354
|
+
},
|
|
319
355
|
searchText: {
|
|
320
356
|
serializedName: "search",
|
|
321
357
|
type: {
|
|
@@ -382,6 +418,44 @@ const SearchRequest = {
|
|
|
382
418
|
type: {
|
|
383
419
|
name: "String"
|
|
384
420
|
}
|
|
421
|
+
},
|
|
422
|
+
vector: {
|
|
423
|
+
serializedName: "vector",
|
|
424
|
+
type: {
|
|
425
|
+
name: "Composite",
|
|
426
|
+
className: "Vector"
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
};
|
|
432
|
+
const Vector = {
|
|
433
|
+
type: {
|
|
434
|
+
name: "Composite",
|
|
435
|
+
className: "Vector",
|
|
436
|
+
modelProperties: {
|
|
437
|
+
value: {
|
|
438
|
+
serializedName: "value",
|
|
439
|
+
type: {
|
|
440
|
+
name: "Sequence",
|
|
441
|
+
element: {
|
|
442
|
+
type: {
|
|
443
|
+
name: "Number"
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
kNearestNeighborsCount: {
|
|
449
|
+
serializedName: "k",
|
|
450
|
+
type: {
|
|
451
|
+
name: "Number"
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
fields: {
|
|
455
|
+
serializedName: "fields",
|
|
456
|
+
type: {
|
|
457
|
+
name: "String"
|
|
458
|
+
}
|
|
385
459
|
}
|
|
386
460
|
}
|
|
387
461
|
}
|
|
@@ -431,6 +505,20 @@ const SearchResult = {
|
|
|
431
505
|
}
|
|
432
506
|
}
|
|
433
507
|
}
|
|
508
|
+
},
|
|
509
|
+
documentDebugInfo: {
|
|
510
|
+
serializedName: "@search\\.documentDebugInfo",
|
|
511
|
+
readOnly: true,
|
|
512
|
+
nullable: true,
|
|
513
|
+
type: {
|
|
514
|
+
name: "Sequence",
|
|
515
|
+
element: {
|
|
516
|
+
type: {
|
|
517
|
+
name: "Composite",
|
|
518
|
+
className: "DocumentDebugInfo"
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
434
522
|
}
|
|
435
523
|
}
|
|
436
524
|
}
|
|
@@ -459,6 +547,120 @@ const CaptionResult = {
|
|
|
459
547
|
}
|
|
460
548
|
}
|
|
461
549
|
};
|
|
550
|
+
const DocumentDebugInfo = {
|
|
551
|
+
type: {
|
|
552
|
+
name: "Composite",
|
|
553
|
+
className: "DocumentDebugInfo",
|
|
554
|
+
modelProperties: {
|
|
555
|
+
semantic: {
|
|
556
|
+
serializedName: "semantic",
|
|
557
|
+
type: {
|
|
558
|
+
name: "Composite",
|
|
559
|
+
className: "SemanticDebugInfo"
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
};
|
|
565
|
+
const SemanticDebugInfo = {
|
|
566
|
+
type: {
|
|
567
|
+
name: "Composite",
|
|
568
|
+
className: "SemanticDebugInfo",
|
|
569
|
+
modelProperties: {
|
|
570
|
+
titleField: {
|
|
571
|
+
serializedName: "titleField",
|
|
572
|
+
type: {
|
|
573
|
+
name: "Composite",
|
|
574
|
+
className: "QueryResultDocumentSemanticField"
|
|
575
|
+
}
|
|
576
|
+
},
|
|
577
|
+
contentFields: {
|
|
578
|
+
serializedName: "contentFields",
|
|
579
|
+
readOnly: true,
|
|
580
|
+
type: {
|
|
581
|
+
name: "Sequence",
|
|
582
|
+
element: {
|
|
583
|
+
type: {
|
|
584
|
+
name: "Composite",
|
|
585
|
+
className: "QueryResultDocumentSemanticField"
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
},
|
|
590
|
+
keywordFields: {
|
|
591
|
+
serializedName: "keywordFields",
|
|
592
|
+
readOnly: true,
|
|
593
|
+
type: {
|
|
594
|
+
name: "Sequence",
|
|
595
|
+
element: {
|
|
596
|
+
type: {
|
|
597
|
+
name: "Composite",
|
|
598
|
+
className: "QueryResultDocumentSemanticField"
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
rerankerInput: {
|
|
604
|
+
serializedName: "rerankerInput",
|
|
605
|
+
type: {
|
|
606
|
+
name: "Composite",
|
|
607
|
+
className: "QueryResultDocumentRerankerInput"
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
};
|
|
613
|
+
const QueryResultDocumentSemanticField = {
|
|
614
|
+
type: {
|
|
615
|
+
name: "Composite",
|
|
616
|
+
className: "QueryResultDocumentSemanticField",
|
|
617
|
+
modelProperties: {
|
|
618
|
+
name: {
|
|
619
|
+
serializedName: "name",
|
|
620
|
+
readOnly: true,
|
|
621
|
+
type: {
|
|
622
|
+
name: "String"
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
state: {
|
|
626
|
+
serializedName: "state",
|
|
627
|
+
readOnly: true,
|
|
628
|
+
type: {
|
|
629
|
+
name: "String"
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
};
|
|
635
|
+
const QueryResultDocumentRerankerInput = {
|
|
636
|
+
type: {
|
|
637
|
+
name: "Composite",
|
|
638
|
+
className: "QueryResultDocumentRerankerInput",
|
|
639
|
+
modelProperties: {
|
|
640
|
+
title: {
|
|
641
|
+
serializedName: "title",
|
|
642
|
+
readOnly: true,
|
|
643
|
+
type: {
|
|
644
|
+
name: "String"
|
|
645
|
+
}
|
|
646
|
+
},
|
|
647
|
+
content: {
|
|
648
|
+
serializedName: "content",
|
|
649
|
+
readOnly: true,
|
|
650
|
+
type: {
|
|
651
|
+
name: "String"
|
|
652
|
+
}
|
|
653
|
+
},
|
|
654
|
+
keywords: {
|
|
655
|
+
serializedName: "keywords",
|
|
656
|
+
readOnly: true,
|
|
657
|
+
type: {
|
|
658
|
+
name: "String"
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
};
|
|
462
664
|
const SuggestDocumentsResult = {
|
|
463
665
|
type: {
|
|
464
666
|
name: "Composite",
|
|
@@ -812,8 +1014,13 @@ var Mappers$1 = /*#__PURE__*/Object.freeze({
|
|
|
812
1014
|
FacetResult: FacetResult,
|
|
813
1015
|
AnswerResult: AnswerResult,
|
|
814
1016
|
SearchRequest: SearchRequest,
|
|
1017
|
+
Vector: Vector,
|
|
815
1018
|
SearchResult: SearchResult,
|
|
816
1019
|
CaptionResult: CaptionResult,
|
|
1020
|
+
DocumentDebugInfo: DocumentDebugInfo,
|
|
1021
|
+
SemanticDebugInfo: SemanticDebugInfo,
|
|
1022
|
+
QueryResultDocumentSemanticField: QueryResultDocumentSemanticField,
|
|
1023
|
+
QueryResultDocumentRerankerInput: QueryResultDocumentRerankerInput,
|
|
817
1024
|
SuggestDocumentsResult: SuggestDocumentsResult,
|
|
818
1025
|
SuggestResult: SuggestResult,
|
|
819
1026
|
SuggestRequest: SuggestRequest,
|
|
@@ -1017,6 +1224,36 @@ const semanticConfiguration = {
|
|
|
1017
1224
|
}
|
|
1018
1225
|
}
|
|
1019
1226
|
};
|
|
1227
|
+
const semanticErrorHandling = {
|
|
1228
|
+
parameterPath: ["options", "searchOptions", "semanticErrorHandling"],
|
|
1229
|
+
mapper: {
|
|
1230
|
+
serializedName: "semanticErrorHandling",
|
|
1231
|
+
type: {
|
|
1232
|
+
name: "String"
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
};
|
|
1236
|
+
const semanticMaxWaitInMilliseconds = {
|
|
1237
|
+
parameterPath: ["options", "searchOptions", "semanticMaxWaitInMilliseconds"],
|
|
1238
|
+
mapper: {
|
|
1239
|
+
constraints: {
|
|
1240
|
+
InclusiveMinimum: 700
|
|
1241
|
+
},
|
|
1242
|
+
serializedName: "semanticMaxWaitInMilliseconds",
|
|
1243
|
+
type: {
|
|
1244
|
+
name: "Number"
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
};
|
|
1248
|
+
const debug = {
|
|
1249
|
+
parameterPath: ["options", "searchOptions", "debug"],
|
|
1250
|
+
mapper: {
|
|
1251
|
+
serializedName: "debug",
|
|
1252
|
+
type: {
|
|
1253
|
+
name: "String"
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
};
|
|
1020
1257
|
const searchFields = {
|
|
1021
1258
|
parameterPath: ["options", "searchOptions", "searchFields"],
|
|
1022
1259
|
mapper: {
|
|
@@ -1532,6 +1769,9 @@ const searchGetOperationSpec = {
|
|
|
1532
1769
|
scoringParameters,
|
|
1533
1770
|
scoringProfile,
|
|
1534
1771
|
semanticConfiguration,
|
|
1772
|
+
semanticErrorHandling,
|
|
1773
|
+
semanticMaxWaitInMilliseconds,
|
|
1774
|
+
debug,
|
|
1535
1775
|
searchFields,
|
|
1536
1776
|
queryLanguage,
|
|
1537
1777
|
speller,
|
|
@@ -2887,15 +3127,16 @@ function convertFieldsToPublic(fields) {
|
|
|
2887
3127
|
return fields;
|
|
2888
3128
|
}
|
|
2889
3129
|
return fields.map((field) => {
|
|
2890
|
-
let result;
|
|
2891
3130
|
if (field.type === "Collection(Edm.ComplexType)" || field.type === "Edm.ComplexType") {
|
|
2892
|
-
|
|
3131
|
+
const result = {
|
|
2893
3132
|
name: field.name,
|
|
2894
3133
|
type: field.type,
|
|
2895
3134
|
fields: convertFieldsToPublic(field.fields),
|
|
2896
3135
|
};
|
|
3136
|
+
return result;
|
|
2897
3137
|
}
|
|
2898
3138
|
else {
|
|
3139
|
+
const type = field.type;
|
|
2899
3140
|
const analyzerName = field.analyzer;
|
|
2900
3141
|
const searchAnalyzerName = field.searchAnalyzer;
|
|
2901
3142
|
const indexAnalyzerName = field.indexAnalyzer;
|
|
@@ -2903,14 +3144,15 @@ function convertFieldsToPublic(fields) {
|
|
|
2903
3144
|
const normalizerName = field.normalizer;
|
|
2904
3145
|
const { retrievable } = field, restField = tslib.__rest(field, ["retrievable"]);
|
|
2905
3146
|
const hidden = typeof retrievable === "boolean" ? !retrievable : retrievable;
|
|
2906
|
-
result = Object.assign(Object.assign({}, restField), {
|
|
3147
|
+
const result = Object.assign(Object.assign({}, restField), { type,
|
|
3148
|
+
hidden,
|
|
2907
3149
|
analyzerName,
|
|
2908
3150
|
searchAnalyzerName,
|
|
2909
3151
|
indexAnalyzerName,
|
|
2910
3152
|
synonymMapNames,
|
|
2911
3153
|
normalizerName });
|
|
3154
|
+
return result;
|
|
2912
3155
|
}
|
|
2913
|
-
return result;
|
|
2914
3156
|
});
|
|
2915
3157
|
}
|
|
2916
3158
|
function convertFieldsToGenerated(fields) {
|
|
@@ -3032,11 +3274,12 @@ function generatedIndexToPublicIndex(generatedIndex) {
|
|
|
3032
3274
|
fields: convertFieldsToPublic(generatedIndex.fields),
|
|
3033
3275
|
similarity: convertSimilarityToPublic(generatedIndex.similarity),
|
|
3034
3276
|
semanticSettings: generatedIndex.semanticSettings,
|
|
3277
|
+
vectorSearch: generatedIndex.vectorSearch,
|
|
3035
3278
|
};
|
|
3036
3279
|
}
|
|
3037
3280
|
function generatedSearchResultToPublicSearchResult(results) {
|
|
3038
3281
|
const returnValues = results.map((result) => {
|
|
3039
|
-
const { _score, _highlights, rerankerScore, captions } = result, restProps = tslib.__rest(result, ["_score", "_highlights", "rerankerScore", "captions"]);
|
|
3282
|
+
const { _score, _highlights, rerankerScore, captions, documentDebugInfo } = result, restProps = tslib.__rest(result, ["_score", "_highlights", "rerankerScore", "captions", "documentDebugInfo"]);
|
|
3040
3283
|
const doc = Object.assign({}, restProps);
|
|
3041
3284
|
const obj = {
|
|
3042
3285
|
score: _score,
|
|
@@ -3044,6 +3287,7 @@ function generatedSearchResultToPublicSearchResult(results) {
|
|
|
3044
3287
|
rerankerScore,
|
|
3045
3288
|
captions,
|
|
3046
3289
|
document: doc,
|
|
3290
|
+
documentDebugInfo,
|
|
3047
3291
|
};
|
|
3048
3292
|
return obj;
|
|
3049
3293
|
});
|
|
@@ -3066,23 +3310,8 @@ function generatedSuggestDocumentsResultToPublicSuggestDocumentsResult(searchDoc
|
|
|
3066
3310
|
return result;
|
|
3067
3311
|
}
|
|
3068
3312
|
function publicIndexToGeneratedIndex(index) {
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
defaultScoringProfile: index.defaultScoringProfile,
|
|
3072
|
-
corsOptions: index.corsOptions,
|
|
3073
|
-
suggesters: index.suggesters,
|
|
3074
|
-
encryptionKey: convertEncryptionKeyToGenerated(index.encryptionKey),
|
|
3075
|
-
etag: index.etag,
|
|
3076
|
-
tokenFilters: convertTokenFiltersToGenerated(index.tokenFilters),
|
|
3077
|
-
charFilters: index.charFilters,
|
|
3078
|
-
normalizers: index.normalizers,
|
|
3079
|
-
scoringProfiles: index.scoringProfiles,
|
|
3080
|
-
analyzers: convertAnalyzersToGenerated(index.analyzers),
|
|
3081
|
-
tokenizers: convertTokenizersToGenerated(index.tokenizers),
|
|
3082
|
-
fields: convertFieldsToGenerated(index.fields),
|
|
3083
|
-
similarity: convertSimilarityToGenerated(index.similarity),
|
|
3084
|
-
semanticSettings: index.semanticSettings,
|
|
3085
|
-
};
|
|
3313
|
+
const { encryptionKey, tokenFilters, analyzers, tokenizers, fields, similarity } = index;
|
|
3314
|
+
return Object.assign(Object.assign({}, index), { encryptionKey: convertEncryptionKeyToGenerated(encryptionKey), tokenFilters: convertTokenFiltersToGenerated(tokenFilters), analyzers: convertAnalyzersToGenerated(analyzers), tokenizers: convertTokenizersToGenerated(tokenizers), fields: convertFieldsToGenerated(fields), similarity: convertSimilarityToGenerated(similarity) });
|
|
3086
3315
|
}
|
|
3087
3316
|
function generatedSkillsetToPublicSkillset(generatedSkillset) {
|
|
3088
3317
|
return {
|
|
@@ -3090,7 +3319,7 @@ function generatedSkillsetToPublicSkillset(generatedSkillset) {
|
|
|
3090
3319
|
description: generatedSkillset.description,
|
|
3091
3320
|
skills: convertSkillsToPublic(generatedSkillset.skills),
|
|
3092
3321
|
cognitiveServicesAccount: convertCognitiveServicesAccountToPublic(generatedSkillset.cognitiveServicesAccount),
|
|
3093
|
-
knowledgeStore: generatedSkillset.knowledgeStore,
|
|
3322
|
+
knowledgeStore: convertKnowledgeStoreToPublic(generatedSkillset.knowledgeStore),
|
|
3094
3323
|
etag: generatedSkillset.etag,
|
|
3095
3324
|
encryptionKey: convertEncryptionKeyToPublic(generatedSkillset.encryptionKey),
|
|
3096
3325
|
};
|
|
@@ -3133,7 +3362,11 @@ function publicSearchIndexerToGeneratedSearchIndexer(indexer) {
|
|
|
3133
3362
|
return Object.assign(Object.assign({}, indexer), { encryptionKey: convertEncryptionKeyToGenerated(indexer.encryptionKey) });
|
|
3134
3363
|
}
|
|
3135
3364
|
function generatedSearchIndexerToPublicSearchIndexer(indexer) {
|
|
3136
|
-
return Object.assign(Object.assign({}, indexer), { encryptionKey: convertEncryptionKeyToPublic(indexer.encryptionKey) });
|
|
3365
|
+
return Object.assign(Object.assign({}, indexer), { encryptionKey: convertEncryptionKeyToPublic(indexer.encryptionKey), cache: convertSearchIndexerCacheToPublic(indexer.cache) });
|
|
3366
|
+
}
|
|
3367
|
+
function generatedSearchRequestToPublicSearchRequest(request) {
|
|
3368
|
+
const { semanticErrorHandling, debug, vector } = request, props = tslib.__rest(request, ["semanticErrorHandling", "debug", "vector"]);
|
|
3369
|
+
return Object.assign({ semanticErrorHandlingMode: semanticErrorHandling, debugMode: debug, vector: convertVectorToPublic(vector) }, props);
|
|
3137
3370
|
}
|
|
3138
3371
|
function publicDataSourceToGeneratedDataSource(dataSource) {
|
|
3139
3372
|
return {
|
|
@@ -3194,6 +3427,14 @@ function convertDataDeletionDetectionPolicyToPublic(dataDeletionDetectionPolicy)
|
|
|
3194
3427
|
}
|
|
3195
3428
|
return dataDeletionDetectionPolicy;
|
|
3196
3429
|
}
|
|
3430
|
+
function convertVectorToPublic(vector) {
|
|
3431
|
+
var _a;
|
|
3432
|
+
if (!vector) {
|
|
3433
|
+
return vector;
|
|
3434
|
+
}
|
|
3435
|
+
const fields = (_a = vector.fields) === null || _a === void 0 ? void 0 : _a.split(",");
|
|
3436
|
+
return Object.assign(Object.assign({}, vector), { fields });
|
|
3437
|
+
}
|
|
3197
3438
|
function getRandomIntegerInclusive(min, max) {
|
|
3198
3439
|
// Make sure inputs are integers.
|
|
3199
3440
|
min = Math.ceil(min);
|
|
@@ -3212,7 +3453,19 @@ function getRandomIntegerInclusive(min, max) {
|
|
|
3212
3453
|
function delay(timeInMs) {
|
|
3213
3454
|
return new Promise((resolve) => setTimeout(() => resolve(), timeInMs));
|
|
3214
3455
|
}
|
|
3215
|
-
const defaultServiceVersion = "
|
|
3456
|
+
const defaultServiceVersion = "2023-07-01-Preview";
|
|
3457
|
+
function convertKnowledgeStoreToPublic(knowledgeStore) {
|
|
3458
|
+
if (!knowledgeStore) {
|
|
3459
|
+
return knowledgeStore;
|
|
3460
|
+
}
|
|
3461
|
+
return Object.assign(Object.assign({}, knowledgeStore), { identity: convertSearchIndexerDataIdentityToPublic(knowledgeStore.identity) });
|
|
3462
|
+
}
|
|
3463
|
+
function convertSearchIndexerCacheToPublic(cache) {
|
|
3464
|
+
if (!cache) {
|
|
3465
|
+
return cache;
|
|
3466
|
+
}
|
|
3467
|
+
return Object.assign(Object.assign({}, cache), { identity: convertSearchIndexerDataIdentityToPublic(cache.identity) });
|
|
3468
|
+
}
|
|
3216
3469
|
|
|
3217
3470
|
// Copyright (c) Microsoft Corporation.
|
|
3218
3471
|
// Licensed under the MIT license.
|
|
@@ -3360,7 +3613,7 @@ class SearchClient {
|
|
|
3360
3613
|
* import {
|
|
3361
3614
|
* AzureKeyCredential,
|
|
3362
3615
|
* SearchClient,
|
|
3363
|
-
*
|
|
3616
|
+
* SearchFieldArray,
|
|
3364
3617
|
* } from "@azure/search-documents";
|
|
3365
3618
|
*
|
|
3366
3619
|
* type TModel = {
|
|
@@ -3374,7 +3627,7 @@ class SearchClient {
|
|
|
3374
3627
|
* new AzureKeyCredential("key")
|
|
3375
3628
|
* );
|
|
3376
3629
|
*
|
|
3377
|
-
* const searchFields:
|
|
3630
|
+
* const searchFields: SearchFieldArray<TModel> = ["azure/sdk"];
|
|
3378
3631
|
*
|
|
3379
3632
|
* const autocompleteResult = await client.autocomplete(
|
|
3380
3633
|
* "searchText",
|
|
@@ -3384,8 +3637,7 @@ class SearchClient {
|
|
|
3384
3637
|
* ```
|
|
3385
3638
|
*/
|
|
3386
3639
|
async autocomplete(searchText, suggesterName, options = {}) {
|
|
3387
|
-
const {
|
|
3388
|
-
const { searchFields } = restOptions, nonFieldOptions = tslib.__rest(restOptions, ["searchFields"]);
|
|
3640
|
+
const { searchFields } = options, nonFieldOptions = tslib.__rest(options, ["searchFields"]);
|
|
3389
3641
|
const fullOptions = Object.assign({ searchText: searchText, suggesterName: suggesterName, searchFields: this.convertSearchFields(searchFields) }, nonFieldOptions);
|
|
3390
3642
|
if (!fullOptions.searchText) {
|
|
3391
3643
|
throw new RangeError("searchText must be provided.");
|
|
@@ -3393,7 +3645,7 @@ class SearchClient {
|
|
|
3393
3645
|
if (!fullOptions.suggesterName) {
|
|
3394
3646
|
throw new RangeError("suggesterName must be provided.");
|
|
3395
3647
|
}
|
|
3396
|
-
const { span, updatedOptions } = createSpan("SearchClient-autocomplete",
|
|
3648
|
+
const { span, updatedOptions } = createSpan("SearchClient-autocomplete", options);
|
|
3397
3649
|
try {
|
|
3398
3650
|
const result = await this.client.documents.autocompletePost(fullOptions, updatedOptions);
|
|
3399
3651
|
return result;
|
|
@@ -3410,22 +3662,16 @@ class SearchClient {
|
|
|
3410
3662
|
}
|
|
3411
3663
|
}
|
|
3412
3664
|
async searchDocuments(searchText, options = {}, nextPageParameters = {}) {
|
|
3413
|
-
const {
|
|
3414
|
-
const {
|
|
3415
|
-
const
|
|
3416
|
-
const { span, updatedOptions } = createSpan("SearchClient-searchDocuments", operationOptions);
|
|
3665
|
+
const { searchFields, semanticFields, select, orderBy, includeTotalCount, vector, answers, semanticErrorHandlingMode, debugMode } = options, restOptions = tslib.__rest(options, ["searchFields", "semanticFields", "select", "orderBy", "includeTotalCount", "vector", "answers", "semanticErrorHandlingMode", "debugMode"]);
|
|
3666
|
+
const fullOptions = Object.assign(Object.assign(Object.assign({}, restOptions), nextPageParameters), { searchFields: this.convertSearchFields(searchFields), semanticFields: this.convertSemanticFields(semanticFields), select: this.convertSelect(select) || "*", orderBy: this.convertOrderBy(orderBy), includeTotalResultCount: includeTotalCount, vector: this.convertVector(vector), answers: this.convertAnswers(answers), semanticErrorHandling: semanticErrorHandlingMode, debug: debugMode });
|
|
3667
|
+
const { span, updatedOptions } = createSpan("SearchClient-searchDocuments", options);
|
|
3417
3668
|
try {
|
|
3418
|
-
const result = await this.client.documents.searchPost(Object.assign(Object.assign({}, fullOptions), {
|
|
3419
|
-
const { results,
|
|
3669
|
+
const result = await this.client.documents.searchPost(Object.assign(Object.assign({}, fullOptions), { searchText: searchText }), updatedOptions);
|
|
3670
|
+
const { results, nextLink, nextPageParameters: resultNextPageParameters, semanticPartialResponseReason, semanticPartialResponseType } = result, restResult = tslib.__rest(result, ["results", "nextLink", "nextPageParameters", "semanticPartialResponseReason", "semanticPartialResponseType"]);
|
|
3420
3671
|
const modifiedResults = generatedSearchResultToPublicSearchResult(results);
|
|
3421
|
-
const converted = {
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
coverage,
|
|
3425
|
-
facets,
|
|
3426
|
-
answers,
|
|
3427
|
-
continuationToken: this.encodeContinuationToken(nextLink, result.nextPageParameters),
|
|
3428
|
-
};
|
|
3672
|
+
const converted = Object.assign(Object.assign({}, restResult), { results: modifiedResults, semanticPartialResponseReason: semanticPartialResponseReason, semanticPartialResponseType: semanticPartialResponseType, continuationToken: this.encodeContinuationToken(nextLink, resultNextPageParameters
|
|
3673
|
+
? generatedSearchRequestToPublicSearchRequest(resultNextPageParameters)
|
|
3674
|
+
: resultNextPageParameters) });
|
|
3429
3675
|
return deserialize(converted);
|
|
3430
3676
|
}
|
|
3431
3677
|
catch (e) {
|
|
@@ -3507,7 +3753,7 @@ class SearchClient {
|
|
|
3507
3753
|
* import {
|
|
3508
3754
|
* AzureKeyCredential,
|
|
3509
3755
|
* SearchClient,
|
|
3510
|
-
*
|
|
3756
|
+
* SearchFieldArray,
|
|
3511
3757
|
* } from "@azure/search-documents";
|
|
3512
3758
|
*
|
|
3513
3759
|
* type TModel = {
|
|
@@ -3522,7 +3768,7 @@ class SearchClient {
|
|
|
3522
3768
|
* );
|
|
3523
3769
|
*
|
|
3524
3770
|
* const select = ["azure/sdk"] as const;
|
|
3525
|
-
* const searchFields:
|
|
3771
|
+
* const searchFields: SearchFieldArray<TModel> = ["azure/sdk"];
|
|
3526
3772
|
*
|
|
3527
3773
|
* const searchResult = await client.search("searchText", {
|
|
3528
3774
|
* select,
|
|
@@ -3534,14 +3780,7 @@ class SearchClient {
|
|
|
3534
3780
|
const { span, updatedOptions } = createSpan("SearchClient-search", options);
|
|
3535
3781
|
try {
|
|
3536
3782
|
const pageResult = await this.searchDocuments(searchText, updatedOptions);
|
|
3537
|
-
|
|
3538
|
-
return {
|
|
3539
|
-
count,
|
|
3540
|
-
coverage,
|
|
3541
|
-
facets,
|
|
3542
|
-
answers,
|
|
3543
|
-
results: this.listSearchResults(pageResult, searchText, updatedOptions),
|
|
3544
|
-
};
|
|
3783
|
+
return Object.assign(Object.assign({}, pageResult), { results: this.listSearchResults(pageResult, searchText, updatedOptions) });
|
|
3545
3784
|
}
|
|
3546
3785
|
catch (e) {
|
|
3547
3786
|
span.setStatus({
|
|
@@ -3565,7 +3804,7 @@ class SearchClient {
|
|
|
3565
3804
|
* import {
|
|
3566
3805
|
* AzureKeyCredential,
|
|
3567
3806
|
* SearchClient,
|
|
3568
|
-
*
|
|
3807
|
+
* SearchFieldArray,
|
|
3569
3808
|
* } from "@azure/search-documents";
|
|
3570
3809
|
*
|
|
3571
3810
|
* type TModel = {
|
|
@@ -3580,7 +3819,7 @@ class SearchClient {
|
|
|
3580
3819
|
* );
|
|
3581
3820
|
*
|
|
3582
3821
|
* const select = ["azure/sdk"] as const;
|
|
3583
|
-
* const searchFields:
|
|
3822
|
+
* const searchFields: SearchFieldArray<TModel> = ["azure/sdk"];
|
|
3584
3823
|
*
|
|
3585
3824
|
* const suggestResult = await client.suggest("searchText", "suggesterName", {
|
|
3586
3825
|
* select,
|
|
@@ -3589,8 +3828,7 @@ class SearchClient {
|
|
|
3589
3828
|
* ```
|
|
3590
3829
|
*/
|
|
3591
3830
|
async suggest(searchText, suggesterName, options = {}) {
|
|
3592
|
-
const {
|
|
3593
|
-
const { select, searchFields, orderBy } = restOptions, nonFieldOptions = tslib.__rest(restOptions, ["select", "searchFields", "orderBy"]);
|
|
3831
|
+
const { select, searchFields, orderBy } = options, nonFieldOptions = tslib.__rest(options, ["select", "searchFields", "orderBy"]);
|
|
3594
3832
|
const fullOptions = Object.assign({ searchText: searchText, suggesterName: suggesterName, searchFields: this.convertSearchFields(searchFields), select: this.convertSelect(select), orderBy: this.convertOrderBy(orderBy) }, nonFieldOptions);
|
|
3595
3833
|
if (!fullOptions.searchText) {
|
|
3596
3834
|
throw new RangeError("searchText must be provided.");
|
|
@@ -3598,7 +3836,7 @@ class SearchClient {
|
|
|
3598
3836
|
if (!fullOptions.suggesterName) {
|
|
3599
3837
|
throw new RangeError("suggesterName must be provided.");
|
|
3600
3838
|
}
|
|
3601
|
-
const { span, updatedOptions } = createSpan("SearchClient-suggest",
|
|
3839
|
+
const { span, updatedOptions } = createSpan("SearchClient-suggest", options);
|
|
3602
3840
|
try {
|
|
3603
3841
|
const result = await this.client.documents.suggestPost(fullOptions, updatedOptions);
|
|
3604
3842
|
const modifiedResult = generatedSuggestDocumentsResultToPublicSuggestDocumentsResult(result);
|
|
@@ -3799,24 +4037,18 @@ class SearchClient {
|
|
|
3799
4037
|
throw new Error(`Corrupted or invalid continuation token: ${decodedToken}`);
|
|
3800
4038
|
}
|
|
3801
4039
|
}
|
|
3802
|
-
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
3803
|
-
extractOperationOptions(obj) {
|
|
3804
|
-
const { abortSignal, requestOptions, tracingOptions } = obj, restOptions = tslib.__rest(obj, ["abortSignal", "requestOptions", "tracingOptions"]);
|
|
3805
|
-
return {
|
|
3806
|
-
operationOptions: {
|
|
3807
|
-
abortSignal,
|
|
3808
|
-
requestOptions,
|
|
3809
|
-
tracingOptions,
|
|
3810
|
-
},
|
|
3811
|
-
restOptions,
|
|
3812
|
-
};
|
|
3813
|
-
}
|
|
3814
4040
|
convertSelect(select) {
|
|
3815
4041
|
if (select) {
|
|
3816
4042
|
return select.join(",");
|
|
3817
4043
|
}
|
|
3818
4044
|
return select;
|
|
3819
4045
|
}
|
|
4046
|
+
convertVectorFields(fields) {
|
|
4047
|
+
if (fields) {
|
|
4048
|
+
return fields.join(",");
|
|
4049
|
+
}
|
|
4050
|
+
return fields;
|
|
4051
|
+
}
|
|
3820
4052
|
convertSearchFields(searchFields) {
|
|
3821
4053
|
if (searchFields) {
|
|
3822
4054
|
return searchFields.join(",");
|
|
@@ -3835,6 +4067,32 @@ class SearchClient {
|
|
|
3835
4067
|
}
|
|
3836
4068
|
return orderBy;
|
|
3837
4069
|
}
|
|
4070
|
+
convertAnswers(answers) {
|
|
4071
|
+
if (!answers || typeof answers === "string") {
|
|
4072
|
+
return answers;
|
|
4073
|
+
}
|
|
4074
|
+
if (answers.answers === "none") {
|
|
4075
|
+
return answers.answers;
|
|
4076
|
+
}
|
|
4077
|
+
const config = [];
|
|
4078
|
+
const { answers: output, count, threshold } = answers;
|
|
4079
|
+
if (count) {
|
|
4080
|
+
config.push(`count-${count}`);
|
|
4081
|
+
}
|
|
4082
|
+
if (threshold) {
|
|
4083
|
+
config.push(`threshold-${threshold}`);
|
|
4084
|
+
}
|
|
4085
|
+
if (config.length) {
|
|
4086
|
+
return output + `|${config.join(",")}`;
|
|
4087
|
+
}
|
|
4088
|
+
return output;
|
|
4089
|
+
}
|
|
4090
|
+
convertVector(vector) {
|
|
4091
|
+
if (!vector) {
|
|
4092
|
+
return vector;
|
|
4093
|
+
}
|
|
4094
|
+
return Object.assign(Object.assign({}, vector), { fields: this.convertVectorFields(vector === null || vector === void 0 ? void 0 : vector.fields) });
|
|
4095
|
+
}
|
|
3838
4096
|
}
|
|
3839
4097
|
|
|
3840
4098
|
// Copyright (c) Microsoft Corporation.
|
|
@@ -4773,9 +5031,7 @@ const FieldMappingFunction = {
|
|
|
4773
5031
|
nullable: true,
|
|
4774
5032
|
type: {
|
|
4775
5033
|
name: "Dictionary",
|
|
4776
|
-
value: {
|
|
4777
|
-
type: { name: "Dictionary", value: { type: { name: "any" } } }
|
|
4778
|
-
}
|
|
5034
|
+
value: { type: { name: "any" } }
|
|
4779
5035
|
}
|
|
4780
5036
|
}
|
|
4781
5037
|
}
|
|
@@ -4798,6 +5054,13 @@ const SearchIndexerCache = {
|
|
|
4798
5054
|
type: {
|
|
4799
5055
|
name: "Boolean"
|
|
4800
5056
|
}
|
|
5057
|
+
},
|
|
5058
|
+
identity: {
|
|
5059
|
+
serializedName: "identity",
|
|
5060
|
+
type: {
|
|
5061
|
+
name: "Composite",
|
|
5062
|
+
className: "SearchIndexerDataIdentity"
|
|
5063
|
+
}
|
|
4801
5064
|
}
|
|
4802
5065
|
}
|
|
4803
5066
|
}
|
|
@@ -5407,6 +5670,13 @@ const SearchIndexerKnowledgeStore = {
|
|
|
5407
5670
|
}
|
|
5408
5671
|
}
|
|
5409
5672
|
}
|
|
5673
|
+
},
|
|
5674
|
+
identity: {
|
|
5675
|
+
serializedName: "identity",
|
|
5676
|
+
type: {
|
|
5677
|
+
name: "Composite",
|
|
5678
|
+
className: "SearchIndexerDataIdentity"
|
|
5679
|
+
}
|
|
5410
5680
|
}
|
|
5411
5681
|
}
|
|
5412
5682
|
}
|
|
@@ -5748,6 +6018,13 @@ const SearchIndex = {
|
|
|
5748
6018
|
className: "SemanticSettings"
|
|
5749
6019
|
}
|
|
5750
6020
|
},
|
|
6021
|
+
vectorSearch: {
|
|
6022
|
+
serializedName: "vectorSearch",
|
|
6023
|
+
type: {
|
|
6024
|
+
name: "Composite",
|
|
6025
|
+
className: "VectorSearch"
|
|
6026
|
+
}
|
|
6027
|
+
},
|
|
5751
6028
|
etag: {
|
|
5752
6029
|
serializedName: "@odata\\.etag",
|
|
5753
6030
|
type: {
|
|
@@ -5840,6 +6117,24 @@ const SearchField = {
|
|
|
5840
6117
|
name: "String"
|
|
5841
6118
|
}
|
|
5842
6119
|
},
|
|
6120
|
+
vectorSearchDimensions: {
|
|
6121
|
+
constraints: {
|
|
6122
|
+
InclusiveMaximum: 2048,
|
|
6123
|
+
InclusiveMinimum: 2
|
|
6124
|
+
},
|
|
6125
|
+
serializedName: "dimensions",
|
|
6126
|
+
nullable: true,
|
|
6127
|
+
type: {
|
|
6128
|
+
name: "Number"
|
|
6129
|
+
}
|
|
6130
|
+
},
|
|
6131
|
+
vectorSearchConfiguration: {
|
|
6132
|
+
serializedName: "vectorSearchConfiguration",
|
|
6133
|
+
nullable: true,
|
|
6134
|
+
type: {
|
|
6135
|
+
name: "String"
|
|
6136
|
+
}
|
|
6137
|
+
},
|
|
5843
6138
|
synonymMaps: {
|
|
5844
6139
|
serializedName: "synonymMaps",
|
|
5845
6140
|
type: {
|
|
@@ -6192,6 +6487,12 @@ const SemanticSettings = {
|
|
|
6192
6487
|
name: "Composite",
|
|
6193
6488
|
className: "SemanticSettings",
|
|
6194
6489
|
modelProperties: {
|
|
6490
|
+
defaultConfiguration: {
|
|
6491
|
+
serializedName: "defaultConfiguration",
|
|
6492
|
+
type: {
|
|
6493
|
+
name: "String"
|
|
6494
|
+
}
|
|
6495
|
+
},
|
|
6195
6496
|
configurations: {
|
|
6196
6497
|
serializedName: "configurations",
|
|
6197
6498
|
type: {
|
|
@@ -6282,6 +6583,53 @@ const SemanticField = {
|
|
|
6282
6583
|
}
|
|
6283
6584
|
}
|
|
6284
6585
|
};
|
|
6586
|
+
const VectorSearch = {
|
|
6587
|
+
type: {
|
|
6588
|
+
name: "Composite",
|
|
6589
|
+
className: "VectorSearch",
|
|
6590
|
+
modelProperties: {
|
|
6591
|
+
algorithmConfigurations: {
|
|
6592
|
+
serializedName: "algorithmConfigurations",
|
|
6593
|
+
type: {
|
|
6594
|
+
name: "Sequence",
|
|
6595
|
+
element: {
|
|
6596
|
+
type: {
|
|
6597
|
+
name: "Composite",
|
|
6598
|
+
className: "VectorSearchAlgorithmConfiguration"
|
|
6599
|
+
}
|
|
6600
|
+
}
|
|
6601
|
+
}
|
|
6602
|
+
}
|
|
6603
|
+
}
|
|
6604
|
+
}
|
|
6605
|
+
};
|
|
6606
|
+
const VectorSearchAlgorithmConfiguration = {
|
|
6607
|
+
type: {
|
|
6608
|
+
name: "Composite",
|
|
6609
|
+
className: "VectorSearchAlgorithmConfiguration",
|
|
6610
|
+
uberParent: "VectorSearchAlgorithmConfiguration",
|
|
6611
|
+
polymorphicDiscriminator: {
|
|
6612
|
+
serializedName: "kind",
|
|
6613
|
+
clientName: "kind"
|
|
6614
|
+
},
|
|
6615
|
+
modelProperties: {
|
|
6616
|
+
name: {
|
|
6617
|
+
serializedName: "name",
|
|
6618
|
+
required: true,
|
|
6619
|
+
type: {
|
|
6620
|
+
name: "String"
|
|
6621
|
+
}
|
|
6622
|
+
},
|
|
6623
|
+
kind: {
|
|
6624
|
+
serializedName: "kind",
|
|
6625
|
+
required: true,
|
|
6626
|
+
type: {
|
|
6627
|
+
name: "String"
|
|
6628
|
+
}
|
|
6629
|
+
}
|
|
6630
|
+
}
|
|
6631
|
+
}
|
|
6632
|
+
};
|
|
6285
6633
|
const ListIndexesResult = {
|
|
6286
6634
|
type: {
|
|
6287
6635
|
name: "Composite",
|
|
@@ -6324,6 +6672,13 @@ const GetIndexStatisticsResult = {
|
|
|
6324
6672
|
type: {
|
|
6325
6673
|
name: "Number"
|
|
6326
6674
|
}
|
|
6675
|
+
},
|
|
6676
|
+
vectorIndexSize: {
|
|
6677
|
+
serializedName: "vectorIndexSize",
|
|
6678
|
+
readOnly: true,
|
|
6679
|
+
type: {
|
|
6680
|
+
name: "Number"
|
|
6681
|
+
}
|
|
6327
6682
|
}
|
|
6328
6683
|
}
|
|
6329
6684
|
}
|
|
@@ -6581,6 +6936,13 @@ const ServiceCounters = {
|
|
|
6581
6936
|
name: "Composite",
|
|
6582
6937
|
className: "ResourceCounter"
|
|
6583
6938
|
}
|
|
6939
|
+
},
|
|
6940
|
+
vectorIndexSizeCounter: {
|
|
6941
|
+
serializedName: "vectorIndexSize",
|
|
6942
|
+
type: {
|
|
6943
|
+
name: "Composite",
|
|
6944
|
+
className: "ResourceCounter"
|
|
6945
|
+
}
|
|
6584
6946
|
}
|
|
6585
6947
|
}
|
|
6586
6948
|
}
|
|
@@ -6643,6 +7005,57 @@ const ServiceLimits = {
|
|
|
6643
7005
|
}
|
|
6644
7006
|
}
|
|
6645
7007
|
};
|
|
7008
|
+
const HnswParameters = {
|
|
7009
|
+
type: {
|
|
7010
|
+
name: "Composite",
|
|
7011
|
+
className: "HnswParameters",
|
|
7012
|
+
modelProperties: {
|
|
7013
|
+
m: {
|
|
7014
|
+
defaultValue: 4,
|
|
7015
|
+
constraints: {
|
|
7016
|
+
InclusiveMaximum: 10,
|
|
7017
|
+
InclusiveMinimum: 4
|
|
7018
|
+
},
|
|
7019
|
+
serializedName: "m",
|
|
7020
|
+
nullable: true,
|
|
7021
|
+
type: {
|
|
7022
|
+
name: "Number"
|
|
7023
|
+
}
|
|
7024
|
+
},
|
|
7025
|
+
efConstruction: {
|
|
7026
|
+
defaultValue: 400,
|
|
7027
|
+
constraints: {
|
|
7028
|
+
InclusiveMaximum: 1000,
|
|
7029
|
+
InclusiveMinimum: 100
|
|
7030
|
+
},
|
|
7031
|
+
serializedName: "efConstruction",
|
|
7032
|
+
nullable: true,
|
|
7033
|
+
type: {
|
|
7034
|
+
name: "Number"
|
|
7035
|
+
}
|
|
7036
|
+
},
|
|
7037
|
+
efSearch: {
|
|
7038
|
+
defaultValue: 500,
|
|
7039
|
+
constraints: {
|
|
7040
|
+
InclusiveMaximum: 1000,
|
|
7041
|
+
InclusiveMinimum: 100
|
|
7042
|
+
},
|
|
7043
|
+
serializedName: "efSearch",
|
|
7044
|
+
nullable: true,
|
|
7045
|
+
type: {
|
|
7046
|
+
name: "Number"
|
|
7047
|
+
}
|
|
7048
|
+
},
|
|
7049
|
+
metric: {
|
|
7050
|
+
serializedName: "metric",
|
|
7051
|
+
nullable: true,
|
|
7052
|
+
type: {
|
|
7053
|
+
name: "String"
|
|
7054
|
+
}
|
|
7055
|
+
}
|
|
7056
|
+
}
|
|
7057
|
+
}
|
|
7058
|
+
};
|
|
6646
7059
|
const DistanceScoringParameters = {
|
|
6647
7060
|
type: {
|
|
6648
7061
|
name: "Composite",
|
|
@@ -7426,9 +7839,7 @@ const DocumentExtractionSkill = {
|
|
|
7426
7839
|
nullable: true,
|
|
7427
7840
|
type: {
|
|
7428
7841
|
name: "Dictionary",
|
|
7429
|
-
value: {
|
|
7430
|
-
type: { name: "Dictionary", value: { type: { name: "any" } } }
|
|
7431
|
-
}
|
|
7842
|
+
value: { type: { name: "any" } }
|
|
7432
7843
|
}
|
|
7433
7844
|
} })
|
|
7434
7845
|
}
|
|
@@ -7474,6 +7885,18 @@ const WebApiSkill = {
|
|
|
7474
7885
|
type: {
|
|
7475
7886
|
name: "Number"
|
|
7476
7887
|
}
|
|
7888
|
+
}, authResourceId: {
|
|
7889
|
+
serializedName: "authResourceId",
|
|
7890
|
+
nullable: true,
|
|
7891
|
+
type: {
|
|
7892
|
+
name: "String"
|
|
7893
|
+
}
|
|
7894
|
+
}, authIdentity: {
|
|
7895
|
+
serializedName: "authIdentity",
|
|
7896
|
+
type: {
|
|
7897
|
+
name: "Composite",
|
|
7898
|
+
className: "SearchIndexerDataIdentity"
|
|
7899
|
+
}
|
|
7477
7900
|
} })
|
|
7478
7901
|
}
|
|
7479
7902
|
};
|
|
@@ -9131,6 +9554,22 @@ const BM25Similarity = {
|
|
|
9131
9554
|
} })
|
|
9132
9555
|
}
|
|
9133
9556
|
};
|
|
9557
|
+
const HnswVectorSearchAlgorithmConfiguration = {
|
|
9558
|
+
serializedName: "hnsw",
|
|
9559
|
+
type: {
|
|
9560
|
+
name: "Composite",
|
|
9561
|
+
className: "HnswVectorSearchAlgorithmConfiguration",
|
|
9562
|
+
uberParent: "VectorSearchAlgorithmConfiguration",
|
|
9563
|
+
polymorphicDiscriminator: VectorSearchAlgorithmConfiguration.type.polymorphicDiscriminator,
|
|
9564
|
+
modelProperties: Object.assign(Object.assign({}, VectorSearchAlgorithmConfiguration.type.modelProperties), { parameters: {
|
|
9565
|
+
serializedName: "hnswParameters",
|
|
9566
|
+
type: {
|
|
9567
|
+
name: "Composite",
|
|
9568
|
+
className: "HnswParameters"
|
|
9569
|
+
}
|
|
9570
|
+
} })
|
|
9571
|
+
}
|
|
9572
|
+
};
|
|
9134
9573
|
const SearchIndexerKnowledgeStoreObjectProjectionSelector = {
|
|
9135
9574
|
type: {
|
|
9136
9575
|
name: "Composite",
|
|
@@ -9158,6 +9597,7 @@ let discriminators = {
|
|
|
9158
9597
|
CharFilter: CharFilter,
|
|
9159
9598
|
LexicalNormalizer: LexicalNormalizer,
|
|
9160
9599
|
Similarity: Similarity,
|
|
9600
|
+
VectorSearchAlgorithmConfiguration: VectorSearchAlgorithmConfiguration,
|
|
9161
9601
|
"SearchIndexerDataIdentity.#Microsoft.Azure.Search.DataNoneIdentity": SearchIndexerDataNoneIdentity,
|
|
9162
9602
|
"SearchIndexerDataIdentity.#Microsoft.Azure.Search.DataUserAssignedIdentity": SearchIndexerDataUserAssignedIdentity,
|
|
9163
9603
|
"DataChangeDetectionPolicy.#Microsoft.Azure.Search.HighWaterMarkChangeDetectionPolicy": HighWaterMarkChangeDetectionPolicy,
|
|
@@ -9233,7 +9673,8 @@ let discriminators = {
|
|
|
9233
9673
|
"CharFilter.#Microsoft.Azure.Search.PatternReplaceCharFilter": PatternReplaceCharFilter,
|
|
9234
9674
|
"LexicalNormalizer.#Microsoft.Azure.Search.CustomNormalizer": CustomNormalizer,
|
|
9235
9675
|
"Similarity.#Microsoft.Azure.Search.ClassicSimilarity": ClassicSimilarity,
|
|
9236
|
-
"Similarity.#Microsoft.Azure.Search.BM25Similarity": BM25Similarity
|
|
9676
|
+
"Similarity.#Microsoft.Azure.Search.BM25Similarity": BM25Similarity,
|
|
9677
|
+
"VectorSearchAlgorithmConfiguration.hnsw": HnswVectorSearchAlgorithmConfiguration
|
|
9237
9678
|
};
|
|
9238
9679
|
|
|
9239
9680
|
var Mappers = /*#__PURE__*/Object.freeze({
|
|
@@ -9292,6 +9733,8 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
|
9292
9733
|
SemanticConfiguration: SemanticConfiguration,
|
|
9293
9734
|
PrioritizedFields: PrioritizedFields,
|
|
9294
9735
|
SemanticField: SemanticField,
|
|
9736
|
+
VectorSearch: VectorSearch,
|
|
9737
|
+
VectorSearchAlgorithmConfiguration: VectorSearchAlgorithmConfiguration,
|
|
9295
9738
|
ListIndexesResult: ListIndexesResult,
|
|
9296
9739
|
GetIndexStatisticsResult: GetIndexStatisticsResult,
|
|
9297
9740
|
AnalyzeRequest: AnalyzeRequest,
|
|
@@ -9303,6 +9746,7 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
|
9303
9746
|
ServiceCounters: ServiceCounters,
|
|
9304
9747
|
ResourceCounter: ResourceCounter,
|
|
9305
9748
|
ServiceLimits: ServiceLimits,
|
|
9749
|
+
HnswParameters: HnswParameters,
|
|
9306
9750
|
DistanceScoringParameters: DistanceScoringParameters,
|
|
9307
9751
|
FreshnessScoringParameters: FreshnessScoringParameters,
|
|
9308
9752
|
MagnitudeScoringParameters: MagnitudeScoringParameters,
|
|
@@ -9387,6 +9831,7 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
|
9387
9831
|
CustomNormalizer: CustomNormalizer,
|
|
9388
9832
|
ClassicSimilarity: ClassicSimilarity,
|
|
9389
9833
|
BM25Similarity: BM25Similarity,
|
|
9834
|
+
HnswVectorSearchAlgorithmConfiguration: HnswVectorSearchAlgorithmConfiguration,
|
|
9390
9835
|
SearchIndexerKnowledgeStoreObjectProjectionSelector: SearchIndexerKnowledgeStoreObjectProjectionSelector,
|
|
9391
9836
|
SearchIndexerKnowledgeStoreFileProjectionSelector: SearchIndexerKnowledgeStoreFileProjectionSelector,
|
|
9392
9837
|
discriminators: discriminators
|
|
@@ -11454,7 +11899,7 @@ class SearchIndexClient {
|
|
|
11454
11899
|
* Retrieves the SearchClient corresponding to this SearchIndexClient
|
|
11455
11900
|
* @param indexName - Name of the index
|
|
11456
11901
|
* @param options - SearchClient Options
|
|
11457
|
-
* @typeParam
|
|
11902
|
+
* @typeParam TModel - An optional type that represents the documents stored in
|
|
11458
11903
|
* the search index. For the best typing experience, all non-key fields should
|
|
11459
11904
|
* be marked optional and nullable, and the key property should have the
|
|
11460
11905
|
* non-nullable type `string`.
|
|
@@ -12101,12 +12546,28 @@ function odata(strings, ...values) {
|
|
|
12101
12546
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
12102
12547
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
12103
12548
|
*/
|
|
12104
|
-
/** Known values of {@link
|
|
12105
|
-
var
|
|
12106
|
-
(function (
|
|
12107
|
-
/** Api Version '
|
|
12108
|
-
|
|
12109
|
-
})(
|
|
12549
|
+
/** Known values of {@link ApiVersion20230701Preview} that the service accepts. */
|
|
12550
|
+
var KnownApiVersion20230701Preview$1;
|
|
12551
|
+
(function (KnownApiVersion20230701Preview) {
|
|
12552
|
+
/** Api Version '2023-07-01-Preview' */
|
|
12553
|
+
KnownApiVersion20230701Preview["TwoThousandTwentyThree0701Preview"] = "2023-07-01-Preview";
|
|
12554
|
+
})(KnownApiVersion20230701Preview$1 || (KnownApiVersion20230701Preview$1 = {}));
|
|
12555
|
+
/** Known values of {@link SemanticErrorHandling} that the service accepts. */
|
|
12556
|
+
var KnownSemanticErrorHandling;
|
|
12557
|
+
(function (KnownSemanticErrorHandling) {
|
|
12558
|
+
/** If the semantic processing fails, partial results still return. The definition of partial results depends on what semantic step failed and what was the reason for failure. */
|
|
12559
|
+
KnownSemanticErrorHandling["Partial"] = "partial";
|
|
12560
|
+
/** If there is an exception during the semantic processing step, the query will fail and return the appropriate HTTP code depending on the error. */
|
|
12561
|
+
KnownSemanticErrorHandling["Fail"] = "fail";
|
|
12562
|
+
})(KnownSemanticErrorHandling || (KnownSemanticErrorHandling = {}));
|
|
12563
|
+
/** Known values of {@link QueryDebugMode} that the service accepts. */
|
|
12564
|
+
var KnownQueryDebugMode;
|
|
12565
|
+
(function (KnownQueryDebugMode) {
|
|
12566
|
+
/** No query debugging information will be returned. */
|
|
12567
|
+
KnownQueryDebugMode["Disabled"] = "disabled";
|
|
12568
|
+
/** Allows the user to further explore their Semantic search results. */
|
|
12569
|
+
KnownQueryDebugMode["Semantic"] = "semantic";
|
|
12570
|
+
})(KnownQueryDebugMode || (KnownQueryDebugMode = {}));
|
|
12110
12571
|
/** Known values of {@link QueryLanguage} that the service accepts. */
|
|
12111
12572
|
exports.KnownQueryLanguage = void 0;
|
|
12112
12573
|
(function (KnownQueryLanguage) {
|
|
@@ -12303,6 +12764,34 @@ exports.KnownQueryCaptionType = void 0;
|
|
|
12303
12764
|
/** Extracts captions from the matching documents that contain passages relevant to the search query. */
|
|
12304
12765
|
KnownQueryCaptionType["Extractive"] = "extractive";
|
|
12305
12766
|
})(exports.KnownQueryCaptionType || (exports.KnownQueryCaptionType = {}));
|
|
12767
|
+
/** Known values of {@link SemanticPartialResponseReason} that the service accepts. */
|
|
12768
|
+
var KnownSemanticPartialResponseReason;
|
|
12769
|
+
(function (KnownSemanticPartialResponseReason) {
|
|
12770
|
+
/** If 'semanticMaxWaitInMilliseconds' was set and the semantic processing duration exceeded that value. Only the base results were returned. */
|
|
12771
|
+
KnownSemanticPartialResponseReason["MaxWaitExceeded"] = "maxWaitExceeded";
|
|
12772
|
+
/** The request was throttled. Only the base results were returned. */
|
|
12773
|
+
KnownSemanticPartialResponseReason["CapacityOverloaded"] = "capacityOverloaded";
|
|
12774
|
+
/** At least one step of the semantic process failed. */
|
|
12775
|
+
KnownSemanticPartialResponseReason["Transient"] = "transient";
|
|
12776
|
+
})(KnownSemanticPartialResponseReason || (KnownSemanticPartialResponseReason = {}));
|
|
12777
|
+
/** Known values of {@link SemanticPartialResponseType} that the service accepts. */
|
|
12778
|
+
var KnownSemanticPartialResponseType;
|
|
12779
|
+
(function (KnownSemanticPartialResponseType) {
|
|
12780
|
+
/** Results without any semantic enrichment or reranking. */
|
|
12781
|
+
KnownSemanticPartialResponseType["BaseResults"] = "baseResults";
|
|
12782
|
+
/** Results have been reranked with the reranker model and will include semantic captions. They will not include any answers, answers highlights or caption highlights. */
|
|
12783
|
+
KnownSemanticPartialResponseType["RerankedResults"] = "rerankedResults";
|
|
12784
|
+
})(KnownSemanticPartialResponseType || (KnownSemanticPartialResponseType = {}));
|
|
12785
|
+
/** Known values of {@link SemanticFieldState} that the service accepts. */
|
|
12786
|
+
var KnownSemanticFieldState;
|
|
12787
|
+
(function (KnownSemanticFieldState) {
|
|
12788
|
+
/** The field was fully used for semantic enrichment. */
|
|
12789
|
+
KnownSemanticFieldState["Used"] = "used";
|
|
12790
|
+
/** The field was not used for semantic enrichment. */
|
|
12791
|
+
KnownSemanticFieldState["Unused"] = "unused";
|
|
12792
|
+
/** The field was partially used for semantic enrichment. */
|
|
12793
|
+
KnownSemanticFieldState["Partial"] = "partial";
|
|
12794
|
+
})(KnownSemanticFieldState || (KnownSemanticFieldState = {}));
|
|
12306
12795
|
|
|
12307
12796
|
/*
|
|
12308
12797
|
* Copyright (c) Microsoft Corporation.
|
|
@@ -12311,12 +12800,12 @@ exports.KnownQueryCaptionType = void 0;
|
|
|
12311
12800
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
12312
12801
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
12313
12802
|
*/
|
|
12314
|
-
/** Known values of {@link
|
|
12315
|
-
var
|
|
12316
|
-
(function (
|
|
12317
|
-
/** Api Version '
|
|
12318
|
-
|
|
12319
|
-
})(
|
|
12803
|
+
/** Known values of {@link ApiVersion20230701Preview} that the service accepts. */
|
|
12804
|
+
var KnownApiVersion20230701Preview;
|
|
12805
|
+
(function (KnownApiVersion20230701Preview) {
|
|
12806
|
+
/** Api Version '2023-07-01-Preview' */
|
|
12807
|
+
KnownApiVersion20230701Preview["TwoThousandTwentyThree0701Preview"] = "2023-07-01-Preview";
|
|
12808
|
+
})(KnownApiVersion20230701Preview || (KnownApiVersion20230701Preview = {}));
|
|
12320
12809
|
/** Known values of {@link SearchIndexerDataSourceType} that the service accepts. */
|
|
12321
12810
|
exports.KnownSearchIndexerDataSourceType = void 0;
|
|
12322
12811
|
(function (KnownSearchIndexerDataSourceType) {
|
|
@@ -12418,14 +12907,8 @@ var KnownSearchFieldDataType;
|
|
|
12418
12907
|
KnownSearchFieldDataType["GeographyPoint"] = "Edm.GeographyPoint";
|
|
12419
12908
|
/** Indicates that a field contains one or more complex objects that in turn have sub-fields of other types. */
|
|
12420
12909
|
KnownSearchFieldDataType["Complex"] = "Edm.ComplexType";
|
|
12421
|
-
|
|
12422
|
-
KnownSearchFieldDataType["
|
|
12423
|
-
KnownSearchFieldDataType["CollectionEdmInt64"] = "Collection(Edm.Int64)";
|
|
12424
|
-
KnownSearchFieldDataType["CollectionEdmDouble"] = "Collection(Edm.Double)";
|
|
12425
|
-
KnownSearchFieldDataType["CollectionEdmBoolean"] = "Collection(Edm.Boolean)";
|
|
12426
|
-
KnownSearchFieldDataType["CollectionEdmDateTimeOffset"] = "Collection(Edm.DateTimeOffset)";
|
|
12427
|
-
KnownSearchFieldDataType["CollectionEdmGeographyPoint"] = "Collection(Edm.GeographyPoint)";
|
|
12428
|
-
KnownSearchFieldDataType["CollectionEdmComplexType"] = "Collection(Edm.ComplexType)";
|
|
12910
|
+
/** Indicates that a field contains a single-precision floating point number. This is only valid when used with Collection(Edm.Single). */
|
|
12911
|
+
KnownSearchFieldDataType["Single"] = "Edm.Single";
|
|
12429
12912
|
})(KnownSearchFieldDataType || (KnownSearchFieldDataType = {}));
|
|
12430
12913
|
/** Known values of {@link LexicalAnalyzerName} that the service accepts. */
|
|
12431
12914
|
exports.KnownLexicalAnalyzerName = void 0;
|
|
@@ -12709,6 +13192,13 @@ exports.KnownCharFilterName = void 0;
|
|
|
12709
13192
|
/** A character filter that attempts to strip out HTML constructs. See https://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.html */
|
|
12710
13193
|
KnownCharFilterName["HtmlStrip"] = "html_strip";
|
|
12711
13194
|
})(exports.KnownCharFilterName || (exports.KnownCharFilterName = {}));
|
|
13195
|
+
/** Known values of {@link VectorSearchAlgorithmMetric} that the service accepts. */
|
|
13196
|
+
var KnownVectorSearchAlgorithmMetric;
|
|
13197
|
+
(function (KnownVectorSearchAlgorithmMetric) {
|
|
13198
|
+
KnownVectorSearchAlgorithmMetric["Cosine"] = "cosine";
|
|
13199
|
+
KnownVectorSearchAlgorithmMetric["Euclidean"] = "euclidean";
|
|
13200
|
+
KnownVectorSearchAlgorithmMetric["DotProduct"] = "dotProduct";
|
|
13201
|
+
})(KnownVectorSearchAlgorithmMetric || (KnownVectorSearchAlgorithmMetric = {}));
|
|
12712
13202
|
/** Known values of {@link KeyPhraseExtractionSkillLanguage} that the service accepts. */
|
|
12713
13203
|
exports.KnownKeyPhraseExtractionSkillLanguage = void 0;
|
|
12714
13204
|
(function (KnownKeyPhraseExtractionSkillLanguage) {
|