Skip to content

Commit d738efb

Browse files
authored
[Search] Regenerate with 2024-03-01-Preview spec (Azure#28576)
1 parent 0108b2b commit d738efb

File tree

108 files changed

+7835
-5915
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+7835
-5915
lines changed

.vscode/cspell.json

Lines changed: 207 additions & 292 deletions
Large diffs are not rendered by default.

sdk/search/perf-tests/search-documents/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"license": "ISC",
1010
"dependencies": {
1111
"@azure/identity": "^4.0.1",
12-
"@azure/search-documents": "12.0.0-beta.4",
12+
"@azure/search-documents": "12.1.0-beta.1",
1313
"@azure/test-utils-perf": "^1.0.0",
1414
"dotenv": "^16.0.0"
1515
},
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"overrides": [
3+
{
4+
"files": ["samples-dev/**.ts"],
5+
"rules": {
6+
// Suppresses errors for the custom TSDoc syntax we use for docs
7+
"tsdoc/syntax": "off",
8+
// Suppresses spurious missing dependency error as ESLint thinks the sample's runtime deps
9+
// should be runtime deps for us too
10+
"import/no-extraneous-dependencies": "off"
11+
}
12+
}
13+
]
14+
}

sdk/search/search-documents/.vscode/settings.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

sdk/search/search-documents/CHANGELOG.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,97 @@
11
# Release History
22

3+
## 12.1.0-beta.1 (2024-02-06)
4+
5+
### Breaking Changes
6+
7+
- Refactor in alignment with v12 [#28576](https://github.com/Azure/azure-sdk-for-js/pull/28576)
8+
- Replace or replace the following types/properties
9+
- Use `ExhaustiveKnnAlgorithmConfiguration` in place of
10+
- `ExhaustiveKnnVectorSearchAlgorithmConfiguration`
11+
- Use `HnswAlgorithmConfiguration` in place of
12+
- `HnswVectorSearchAlgorithmConfiguration`
13+
- Use `PIIDetectionSkill.categories` in place of
14+
- `PIIDetectionSkill.piiCategories`
15+
- Use `QueryAnswer` in place of
16+
- `Answers`
17+
- `AnswersOption`
18+
- `QueryAnswerType`
19+
- Use `QueryAnswerResult` in place of
20+
- `AnswerResult`
21+
- Use `QueryCaption` in place of
22+
- `Captions`
23+
- `QueryCaptionType`
24+
- Use `QueryCaptionResult` in place of
25+
- `CaptionResult`
26+
- Use `SearchRequestOptions.VectorSearchOptions.filterMode` in place of
27+
- `SearchRequestOptions.vectorFilterMode`
28+
- Use `SearchRequestOptions.VectorSearchOptions.queries` in place of
29+
- `SearchRequestOptions.vectorQueries`
30+
- Use `SearchRequestOptions.semanticSearchOptions.answers` in place of
31+
- `SearchRequestOptions.answers`
32+
- Use `SearchRequestOptions.semanticSearchOptions.captions` in place of
33+
- `SearchRequestOptions.captions`
34+
- Use `SearchRequestOptions.semanticSearchOptions.configurationName` in place of
35+
- `SearchRequestOptions.semanticConfiguration`
36+
- Use `SearchRequestOptions.semanticSearchOptions.debugMode` in place of
37+
- `SearchRequestOptions.debugMode`
38+
- Use `SearchRequestOptions.semanticSearchOptions.errorMode` in place of
39+
- `SearchRequestOptions.semanticErrorHandlingMode`
40+
- Use `SearchRequestOptions.semanticSearchOptions.maxWaitInMilliseconds` in place of
41+
- `SearchRequestOptions.semanticMaxWaitInMilliseconds`
42+
- Use `SearchRequestOptions.semanticSearchOptions.semanticFields` in place of
43+
- `SearchRequestOptions.semanticFields`
44+
- Use `SearchRequestOptions.semanticSearchOptions.semanticQuery` in place of
45+
- `SearchRequestOptions.semanticQuery`
46+
- Use `SemanticErrorMode` in place of
47+
- `SemanticErrorHandlingMode`
48+
- Use `SemanticErrorReason` in place of
49+
- `SemanticPartialResponseReason`
50+
- Use `SemanticPrioritizedFields` in place of
51+
- `PrioritizedFields`
52+
- Use `SemanticSearch` in place of
53+
- `SemanticSettings`
54+
- Use `SemanticSearchResultsType` in place of
55+
- `SemanticPartialResponseType`
56+
- Use `SimpleField.vectorSearchProfileName` in place of
57+
- `SimpleField.vectorSearchProfile`
58+
- Use `VectorSearchProfile.algorithmConfigurationName` in place of
59+
- `VectorSearchProfile.algorithm`
60+
- Narrow some enum property types to the respective string literal union
61+
- `BlobIndexerDataToExtract`
62+
- `BlobIndexerImageAction`
63+
- `BlobIndexerParsingMode`
64+
- `BlobIndexerPDFTextRotationAlgorithm`
65+
- `CustomEntityLookupSkillLanguage`
66+
- `EntityCategory`
67+
- `EntityRecognitionSkillLanguage`
68+
- `ImageAnalysisSkillLanguage`
69+
- `ImageDetail`
70+
- `IndexerExecutionEnvironment`
71+
- `KeyPhraseExtractionSkillLanguage`
72+
- `OcrSkillLanguage`
73+
- `RegexFlags`
74+
- `SearchIndexerDataSourceType`
75+
- `SentimentSkillLanguage`
76+
- `SplitSkillLanguage`
77+
- `TextSplitMode`
78+
- `TextTranslationSkillLanguage`
79+
- `VisualFeature`
80+
- Remove `KnownLexicalAnalyzerName` as a duplicate of `KnownAnalyzerNames`
81+
- Remove `KnownCharFilterName` as a duplicate of `KnownCharFilterNames`
82+
- Remove `KnownTokenFilterName` as a duplicate of `KnownTokenFilterNames`
83+
- Remove `SearchRequest` as a duplicate of `SearchRequestOptions`
84+
85+
### Features Added
86+
87+
- Add vector compression [#28772](https://github.com/Azure/azure-sdk-for-js/pull/28772)
88+
- Service-side scalar quantization of your vector data
89+
- Optional reranking with full-precision vectors
90+
- Optional oversampling of documents when reranking compressed vectors
91+
- Add `Edm.Half`, `Edm.Int16`, and `Edm.SByte` vector spaces [#28772](https://github.com/Azure/azure-sdk-for-js/pull/28772)
92+
- Add non-persistent vector usage through `SimpleField.stored` [#28772](https://github.com/Azure/azure-sdk-for-js/pull/28772)
93+
- Expose the internal HTTP pipeline to allow users to send raw requests with it
94+
395
## 12.0.0-beta.4 (2023-10-11)
496

597
### Features Added

sdk/search/search-documents/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The Azure AI Search service is well suited for the following application scenari
1717
* In a search client application, implement query logic and user experiences
1818
similar to commercial web search engines and chat-style apps.
1919

20-
Use the Azure.Search.Documents client library to:
20+
Use the @azure/search-documents client library to:
2121

2222
* Submit queries using vector, keyword, and hybrid query forms.
2323
* Implement filtered queries for metadata, geospatial search, faceted navigation,
@@ -349,14 +349,14 @@ interface Hotel {
349349
hotelId?: string;
350350
hotelName?: string | null;
351351
description?: string | null;
352-
descriptionVector?: Array<number> | null;
352+
descriptionVector?: Array<number>;
353353
parkingIncluded?: boolean | null;
354354
lastRenovationDate?: Date | null;
355355
rating?: number | null;
356356
rooms?: Array<{
357357
beds?: number | null;
358358
description?: string | null;
359-
} | null>;
359+
}>;
360360
}
361361

362362
const client = new SearchClient<Hotel>(

sdk/search/search-documents/api-extractor.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@
1010
},
1111
"dtsRollup": {
1212
"enabled": true,
13-
"untrimmedFilePath": "",
14-
"publicTrimmedFilePath": "./types/search-documents.d.ts"
13+
"publicTrimmedFilePath": "./types/search-documents.d.ts",
14+
"untrimmedFilePath": ""
1515
},
1616
"messages": {
17-
"tsdocMessageReporting": {
18-
"default": {
19-
"logLevel": "none"
20-
}
21-
},
2217
"extractorMessageReporting": {
2318
"ae-missing-release-tag": {
2419
"logLevel": "none"
2520
},
2621
"ae-unresolved-link": {
2722
"logLevel": "none"
2823
}
24+
},
25+
"tsdocMessageReporting": {
26+
"default": {
27+
"logLevel": "none"
28+
}
2929
}
3030
}
3131
}

sdk/search/search-documents/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "js",
44
"TagPrefix": "js/search/search-documents",
5-
"Tag": "js/search/search-documents_f8e9f163e2"
5+
"Tag": "js/search/search-documents_b75f2ec5af"
66
}

sdk/search/search-documents/openai-patch.diff

Lines changed: 0 additions & 4 deletions
This file was deleted.

sdk/search/search-documents/package.json

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
{
22
"name": "@azure/search-documents",
3-
"version": "12.0.0-beta.4",
3+
"version": "12.1.0-beta.1",
44
"description": "Azure client library to use Cognitive Search for node.js and browser.",
55
"sdk-type": "client",
66
"main": "dist/index.js",
77
"module": "dist-esm/src/index.js",
88
"types": "types/search-documents.d.ts",
99
"scripts": {
1010
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
11+
"build": "npm run clean && tsc -p . && dev-tool run bundle && api-extractor run --local",
1112
"build:browser": "tsc -p . && dev-tool run bundle",
1213
"build:node": "tsc -p . && dev-tool run bundle",
1314
"build:samples": "echo Obsolete.",
14-
"execute:samples": "dev-tool samples run samples-dev",
1515
"build:test": "tsc -p . && dev-tool run bundle",
16-
"build": "npm run clean && tsc -p . && dev-tool run bundle && api-extractor run --local",
1716
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
1817
"clean": "rimraf --glob dist dist-* temp types *.tgz *.log",
18+
"execute:samples": "dev-tool samples run samples-dev",
1919
"extract-api": "tsc -p . && api-extractor run --local",
2020
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
2121
"generate:client": "autorest --typescript swagger/Service.md & autorest --typescript swagger/Data.md & wait",
2222
"generate:embeddings": "ts-node scripts/generateSampleEmbeddings.ts",
23+
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
2324
"integration-test:browser": "dev-tool run test:browser",
2425
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/test/**/*.spec.js'",
25-
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
26-
"lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]",
27-
"lint": "eslint package.json api-extractor.json src test --ext .ts",
26+
"lint": "eslint package.json api-extractor.json src test samples-dev --ext .ts",
27+
"lint:fix": "eslint package.json api-extractor.json src test samples-dev --ext .ts --fix --fix-type [problem,suggestion]",
2828
"pack": "npm pack 2>&1",
29+
"test": "npm run build:test && npm run unit-test",
2930
"test:browser": "npm run build:test && npm run unit-test:browser",
3031
"test:node": "npm run build:test && npm run unit-test:node",
31-
"test": "npm run build:test && npm run unit-test",
32+
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
3233
"unit-test:browser": "dev-tool run test:browser",
33-
"unit-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 \"test/**/*.spec.ts\" \"test/**/**/*.spec.ts\"",
34-
"unit-test": "npm run unit-test:node && npm run unit-test:browser"
34+
"unit-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 \"test/**/*.spec.ts\" \"test/**/**/*.spec.ts\""
3535
},
3636
"files": [
37-
"dist/",
38-
"dist-esm/src/",
39-
"types/search-documents.d.ts",
37+
"LICENSE",
4038
"README.md",
41-
"LICENSE"
39+
"dist-esm/src/",
40+
"dist/",
41+
"types/search-documents.d.ts"
4242
],
4343
"browser": {
4444
"./dist-esm/src/base64.js": "./dist-esm/src/base64.browser.js",
@@ -47,12 +47,8 @@
4747
"//metadata": {
4848
"constantPaths": [
4949
{
50-
"path": "swagger/Service.md",
51-
"prefix": "package-version"
52-
},
53-
{
54-
"path": "swagger/Data.md",
55-
"prefix": "package-version"
50+
"path": "src/constants.ts",
51+
"prefix": "SDK_VERSION"
5652
},
5753
{
5854
"path": "src/generated/data/searchClient.ts",
@@ -63,8 +59,12 @@
6359
"prefix": "packageDetails"
6460
},
6561
{
66-
"path": "src/constants.ts",
67-
"prefix": "SDK_VERSION"
62+
"path": "swagger/Data.md",
63+
"prefix": "package-version"
64+
},
65+
{
66+
"path": "swagger/Service.md",
67+
"prefix": "package-version"
6868
}
6969
]
7070
},
@@ -84,31 +84,34 @@
8484
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/search/search-documents/",
8585
"sideEffects": false,
8686
"dependencies": {
87-
"@azure/core-client": "^1.3.0",
8887
"@azure/core-auth": "^1.3.0",
88+
"@azure/core-client": "^1.3.0",
89+
"@azure/core-http-compat": "^2.0.1",
8990
"@azure/core-paging": "^1.1.1",
90-
"@azure/core-tracing": "^1.0.0",
9191
"@azure/core-rest-pipeline": "^1.3.0",
92-
"@azure/core-http-compat": "^2.0.1",
92+
"@azure/core-tracing": "^1.0.0",
9393
"@azure/logger": "^1.0.0",
94-
"tslib": "^2.2.0",
95-
"events": "^3.0.0"
94+
"events": "^3.0.0",
95+
"tslib": "^2.2.0"
9696
},
9797
"devDependencies": {
98-
"@azure/openai": "1.0.0-beta.12",
99-
"@azure/test-utils": "^1.0.0",
98+
"@azure-tools/test-recorder": "^3.0.0",
99+
"@azure/core-util": "^1.6.1",
100100
"@azure/dev-tool": "^1.0.0",
101101
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
102-
"@azure-tools/test-recorder": "^3.0.0",
102+
"@azure/openai": "1.0.0-beta.12",
103+
"@azure/test-utils": "^1.0.0",
103104
"@microsoft/api-extractor": "^7.31.1",
104105
"@types/chai": "^4.1.6",
105106
"@types/mocha": "^10.0.0",
106107
"@types/node": "^18.0.0",
107108
"@types/sinon": "^17.0.0",
109+
"c8": "^8.0.0",
108110
"chai": "^4.2.0",
109111
"cross-env": "^7.0.2",
110112
"dotenv": "^16.0.0",
111113
"eslint": "^8.0.0",
114+
"esm": "^3.2.18",
112115
"inherits": "^2.0.3",
113116
"karma": "^6.2.0",
114117
"karma-chrome-launcher": "^3.0.0",
@@ -122,13 +125,11 @@
122125
"karma-mocha-reporter": "^2.2.5",
123126
"karma-sourcemap-loader": "^0.3.8",
124127
"mocha": "^10.0.0",
125-
"c8": "^8.0.0",
126128
"rimraf": "^5.0.5",
127129
"sinon": "^17.0.0",
128130
"ts-node": "^10.0.0",
129131
"typescript": "~5.3.3",
130-
"util": "^0.12.1",
131-
"esm": "^3.2.18"
132+
"util": "^0.12.1"
132133
},
133134
"//sampleConfiguration": {
134135
"productName": "Azure Search Documents",

0 commit comments

Comments
 (0)