@azure/search-documents 12.0.0-alpha.20230727.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 CHANGED
@@ -419,11 +419,16 @@ const SearchRequest = {
419
419
  name: "String"
420
420
  }
421
421
  },
422
- vector: {
423
- serializedName: "vector",
422
+ vectors: {
423
+ serializedName: "vectors",
424
424
  type: {
425
- name: "Composite",
426
- className: "Vector"
425
+ name: "Sequence",
426
+ element: {
427
+ type: {
428
+ name: "Composite",
429
+ className: "Vector"
430
+ }
431
+ }
427
432
  }
428
433
  }
429
434
  }
@@ -1974,7 +1979,7 @@ class SearchClient$1 extends coreHttpCompat__namespace.ExtendedServiceClient {
1974
1979
  const defaults = {
1975
1980
  requestContentType: "application/json; charset=utf-8"
1976
1981
  };
1977
- const packageDetails = `azsdk-js-search-documents/12.0.0-beta.2`;
1982
+ const packageDetails = `azsdk-js-search-documents/12.0.0-beta.3`;
1978
1983
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
1979
1984
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
1980
1985
  : `${packageDetails}`;
@@ -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, vector } = request, props = tslib.__rest(request, ["semanticErrorHandling", "debug", "vector"]);
3369
- return Object.assign({ semanticErrorHandlingMode: semanticErrorHandling, debugMode: debug, vector: convertVectorToPublic(vector) }, props);
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, 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 });
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);
@@ -11207,7 +11213,7 @@ class SearchServiceClient extends coreHttpCompat__namespace.ExtendedServiceClien
11207
11213
  const defaults = {
11208
11214
  requestContentType: "application/json; charset=utf-8"
11209
11215
  };
11210
- const packageDetails = `azsdk-js-search-documents/12.0.0-beta.2`;
11216
+ const packageDetails = `azsdk-js-search-documents/12.0.0-beta.3`;
11211
11217
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
11212
11218
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
11213
11219
  : `${packageDetails}`;