@azure/search-documents 12.0.0-alpha.20230803.2 → 12.0.0-alpha.20230810.5
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/dist/index.js +14 -8
- package/dist/index.js.map +1 -1
- package/dist-esm/src/generated/data/models/index.js.map +1 -1
- package/dist-esm/src/generated/data/models/mappers.js +9 -4
- package/dist-esm/src/generated/data/models/mappers.js.map +1 -1
- package/dist-esm/src/indexModels.js.map +1 -1
- package/dist-esm/src/searchClient.js +2 -2
- package/dist-esm/src/searchClient.js.map +1 -1
- package/dist-esm/src/serviceUtils.js +3 -2
- package/dist-esm/src/serviceUtils.js.map +1 -1
- package/package.json +2 -1
- package/types/search-documents.d.ts +4 -4
package/dist/index.js
CHANGED
|
@@ -419,11 +419,16 @@ const SearchRequest = {
|
|
|
419
419
|
name: "String"
|
|
420
420
|
}
|
|
421
421
|
},
|
|
422
|
-
|
|
423
|
-
serializedName: "
|
|
422
|
+
vectors: {
|
|
423
|
+
serializedName: "vectors",
|
|
424
424
|
type: {
|
|
425
|
-
name: "
|
|
426
|
-
|
|
425
|
+
name: "Sequence",
|
|
426
|
+
element: {
|
|
427
|
+
type: {
|
|
428
|
+
name: "Composite",
|
|
429
|
+
className: "Vector"
|
|
430
|
+
}
|
|
431
|
+
}
|
|
427
432
|
}
|
|
428
433
|
}
|
|
429
434
|
}
|
|
@@ -3365,8 +3370,9 @@ function generatedSearchIndexerToPublicSearchIndexer(indexer) {
|
|
|
3365
3370
|
return Object.assign(Object.assign({}, indexer), { encryptionKey: convertEncryptionKeyToPublic(indexer.encryptionKey), cache: convertSearchIndexerCacheToPublic(indexer.cache) });
|
|
3366
3371
|
}
|
|
3367
3372
|
function generatedSearchRequestToPublicSearchRequest(request) {
|
|
3368
|
-
const { semanticErrorHandling, debug,
|
|
3369
|
-
|
|
3373
|
+
const { semanticErrorHandling, debug, vectors } = request, props = tslib.__rest(request, ["semanticErrorHandling", "debug", "vectors"]);
|
|
3374
|
+
const publicRequest = Object.assign({ semanticErrorHandlingMode: semanticErrorHandling, debugMode: debug, vectors: vectors === null || vectors === void 0 ? void 0 : vectors.map((convertVectorToPublic)).filter((v) => v !== undefined) }, props);
|
|
3375
|
+
return publicRequest;
|
|
3370
3376
|
}
|
|
3371
3377
|
function publicDataSourceToGeneratedDataSource(dataSource) {
|
|
3372
3378
|
return {
|
|
@@ -3662,8 +3668,8 @@ class SearchClient {
|
|
|
3662
3668
|
}
|
|
3663
3669
|
}
|
|
3664
3670
|
async searchDocuments(searchText, options = {}, nextPageParameters = {}) {
|
|
3665
|
-
const { searchFields, semanticFields, select, orderBy, includeTotalCount,
|
|
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,
|
|
3671
|
+
const { searchFields, semanticFields, select, orderBy, includeTotalCount, vectors, answers, semanticErrorHandlingMode, debugMode } = options, restOptions = tslib.__rest(options, ["searchFields", "semanticFields", "select", "orderBy", "includeTotalCount", "vectors", "answers", "semanticErrorHandlingMode", "debugMode"]);
|
|
3672
|
+
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, vectors: vectors === null || vectors === void 0 ? void 0 : vectors.map(this.convertVector.bind(this)), answers: this.convertAnswers(answers), semanticErrorHandling: semanticErrorHandlingMode, debug: debugMode });
|
|
3667
3673
|
const { span, updatedOptions } = createSpan("SearchClient-searchDocuments", options);
|
|
3668
3674
|
try {
|
|
3669
3675
|
const result = await this.client.documents.searchPost(Object.assign(Object.assign({}, fullOptions), { searchText: searchText }), updatedOptions);
|