Skip to content

Commit

Permalink
November Release Changes (#18530)
Browse files Browse the repository at this point in the history
* November Release Changes

* Optimize through Swagger Overrides
  • Loading branch information
sarangan12 authored Nov 4, 2021
1 parent 33dac6d commit 9968540
Show file tree
Hide file tree
Showing 12 changed files with 106 additions and 46 deletions.
2 changes: 1 addition & 1 deletion sdk/search/perf-tests/search-documents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"license": "ISC",
"dependencies": {
"@azure/identity": "^2.0.1",
"@azure/search-documents": "11.3.0-beta.4",
"@azure/search-documents": "11.3.0-beta.5",
"@azure/test-utils-perf": "^1.0.0",
"dotenv": "^8.2.0"
},
Expand Down
12 changes: 11 additions & 1 deletion sdk/search/search-documents/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Release History

## 11.3.0-beta.4 (2021-10-05)
## 11.3.0-beta.5 (2021-11-09)

### Breaking Changes

- Renamed `IndexerCurrentState` property to `IndexerState` property.
- Renamed `AllDocsInitialChangeTrackingState` property to `AllDocumentsInitialChangeTrackingState` property.
- Renamed `AllDocsFinalChangeTrackingState` property to `AllDocumentsFinalChangeTrackingState` property.
- Renamed `ResetDocsInitialChangeTrackingState` property to `ResetDocumentsInitialChangeTrackingState` property.
- Renamed `ResetDocsFinalChangeTrackingState` property to `ResetDocumentsFinalChangeTrackingState` property.
- Renamed `SkillNames` property to `ResetSkillsOptions` (with a `SkillNames` property)
- Renamed `ResetDocs` method to `ResetDocuments` in the SDK client.

### Features Added

Expand Down
2 changes: 1 addition & 1 deletion sdk/search/search-documents/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@azure/search-documents",
"version": "11.3.0-beta.4",
"version": "11.3.0-beta.5",
"description": "Azure client library to use Cognitive Search for node.js and browser.",
"sdk-type": "client",
"main": "dist/index.js",
Expand Down
34 changes: 18 additions & 16 deletions sdk/search/search-documents/review/search-documents.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -629,23 +629,12 @@ export interface IndexDocumentsResult {
readonly results: IndexingResult[];
}

// @public
export interface IndexerCurrentState {
readonly allDocsFinalChangeTrackingState?: string;
readonly allDocsInitialChangeTrackingState?: string;
readonly mode?: IndexingMode;
readonly resetDatasourceDocumentIds?: string[];
readonly resetDocsFinalChangeTrackingState?: string;
readonly resetDocsInitialChangeTrackingState?: string;
readonly resetDocumentKeys?: string[];
}

// @public
export type IndexerExecutionEnvironment = string;

// @public
export interface IndexerExecutionResult {
readonly currentState?: IndexerCurrentState;
readonly currentState?: IndexerState;
readonly endTime?: Date;
readonly errorMessage?: string;
readonly errors: SearchIndexerError[];
Expand All @@ -665,6 +654,17 @@ export type IndexerExecutionStatus = "transientFailure" | "success" | "inProgres
// @public
export type IndexerExecutionStatusDetail = string;

// @public
export interface IndexerState {
readonly allDocumentsFinalChangeTrackingState?: string;
readonly allDocumentsInitialChangeTrackingState?: string;
readonly mode?: IndexingMode;
readonly resetDatasourceDocumentIds?: string[];
readonly resetDocumentKeys?: string[];
readonly resetDocumentsFinalChangeTrackingState?: string;
readonly resetDocumentsInitialChangeTrackingState?: string;
}

// @public
export type IndexerStatus = "unknown" | "error" | "running";

Expand Down Expand Up @@ -1677,7 +1677,7 @@ export type QueryType = "simple" | "full" | "semantic";
export type RegexFlags = string;

// @public
export interface ResetDocsOptions extends OperationOptions {
export interface ResetDocumentsOptions extends OperationOptions {
datasourceDocumentIds?: string[];
documentKeys?: string[];
overwrite?: boolean;
Expand All @@ -1687,7 +1687,9 @@ export interface ResetDocsOptions extends OperationOptions {
export type ResetIndexerOptions = OperationOptions;

// @public
export type ResetSkillsOptions = OperationOptions;
export interface ResetSkillsOptions extends OperationOptions {
skillNames?: string[];
}

// @public
export interface ResourceCounter {
Expand Down Expand Up @@ -1862,9 +1864,9 @@ export class SearchIndexerClient {
listIndexersNames(options?: ListIndexersOptions): Promise<Array<string>>;
listSkillsets(options?: ListSkillsetsOptions): Promise<Array<SearchIndexerSkillset>>;
listSkillsetsNames(options?: ListSkillsetsOptions): Promise<Array<string>>;
resetDocs(indexerName: string, options?: ResetDocsOptions): Promise<void>;
resetDocuments(indexerName: string, options?: ResetDocumentsOptions): Promise<void>;
resetIndexer(indexerName: string, options?: ResetIndexerOptions): Promise<void>;
resetSkills(skillsetName: string, skillNames: string[], options?: ResetSkillsOptions): Promise<void>;
resetSkills(skillsetName: string, options?: ResetSkillsOptions): Promise<void>;
runIndexer(indexerName: string, options?: RunIndexerOptions): Promise<void>;
}

Expand Down
2 changes: 1 addition & 1 deletion sdk/search/search-documents/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

export const SDK_VERSION: string = "11.3.0-beta.4";
export const SDK_VERSION: string = "11.3.0-beta.5";

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions sdk/search/search-documents/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export {
SearchIndexer,
LexicalNormalizer,
SearchIndexerDataIdentity,
ResetDocsOptions,
ResetDocumentsOptions,
ResetSkillsOptions
} from "./serviceModels";
export { default as GeographyPoint } from "./geographyPoint";
Expand Down Expand Up @@ -321,7 +321,7 @@ export {
KnownLineEnding,
SearchIndexerDataIdentity as BaseSearchIndexerDataIdentity,
SearchIndexerCache,
IndexerCurrentState,
IndexerState,
IndexerExecutionStatusDetail,
KnownIndexerExecutionStatusDetail,
IndexingMode,
Expand Down
19 changes: 11 additions & 8 deletions sdk/search/search-documents/src/searchIndexerClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
DeleteDataSourceConnectionOptions,
GetDataSourceConnectionOptions,
CreateorUpdateDataSourceConnectionOptions,
ResetDocsOptions,
ResetDocumentsOptions,
ResetSkillsOptions
} from "./serviceModels";
import * as utils from "./serviceUtils";
Expand Down Expand Up @@ -733,7 +733,10 @@ export class SearchIndexerClient {
* @param indexerName - The name of the indexer to reset documents for.
* @param options - Additional optional arguments.
*/
public async resetDocs(indexerName: string, options: ResetDocsOptions = {}): Promise<void> {
public async resetDocuments(
indexerName: string,
options: ResetDocumentsOptions = {}
): Promise<void> {
const { span, updatedOptions } = createSpan("SearchIndexerClient-resetDocs", options);
try {
await this.client.indexers.resetDocs(indexerName, {
Expand All @@ -760,14 +763,14 @@ export class SearchIndexerClient {
* @param skillNames - The names of skills to reset.
* @param options - The options parameters.
*/
public async resetSkills(
skillsetName: string,
skillNames: string[],
options: ResetSkillsOptions = {}
): Promise<void> {
public async resetSkills(skillsetName: string, options: ResetSkillsOptions = {}): Promise<void> {
const { span, updatedOptions } = createSpan("SearchIndexerClient-resetSkills", options);
try {
await this.client.skillsets.resetSkills(skillsetName, { skillNames }, updatedOptions);
await this.client.skillsets.resetSkills(
skillsetName,
{ skillNames: options.skillNames },
updatedOptions
);
} catch (e) {
span.setStatus({
code: SpanStatusCode.ERROR,
Expand Down
7 changes: 5 additions & 2 deletions sdk/search/search-documents/src/serviceModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export interface CreateOrUpdateIndexOptions extends OperationOptions {
/**
* Options for reset docs operation.
*/
export interface ResetDocsOptions extends OperationOptions {
export interface ResetDocumentsOptions extends OperationOptions {
/** document keys to be reset */
documentKeys?: string[];
/** datasource document identifiers to be reset */
Expand All @@ -252,7 +252,10 @@ export interface ResetDocsOptions extends OperationOptions {
/**
* Options for reset skills operation.
*/
export type ResetSkillsOptions = OperationOptions;
export interface ResetSkillsOptions extends OperationOptions {
/** the names of skills to be reset. */
skillNames?: string[];
}

/**
* Options for create/update skillset operation.
Expand Down
42 changes: 42 additions & 0 deletions sdk/search/search-documents/swagger/Service.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,3 +289,45 @@ directive:
transform: >
$["discriminator"] = "@odata.type";
```
### Renames
```yaml
directive:
from: swagger-document
where: $.definitions.IndexerCurrentState
transform: >
$["x-ms-client-name"] = "IndexerState";
```
```yaml
directive:
from: swagger-document
where: $.definitions.IndexerCurrentState.properties.allDocsInitialChangeTrackingState
transform: >
$["x-ms-client-name"] = "allDocumentsInitialChangeTrackingState";
```
```yaml
directive:
from: swagger-document
where: $.definitions.IndexerCurrentState.properties.allDocsFinalChangeTrackingState
transform: >
$["x-ms-client-name"] = "allDocumentsFinalChangeTrackingState";
```
```yaml
directive:
from: swagger-document
where: $.definitions.IndexerCurrentState.properties.resetDocsInitialChangeTrackingState
transform: >
$["x-ms-client-name"] = "resetDocumentsInitialChangeTrackingState";
```
```yaml
directive:
from: swagger-document
where: $.definitions.IndexerCurrentState.properties.resetDocsFinalChangeTrackingState
transform: >
$["x-ms-client-name"] = "ResetDocumentsFinalChangeTrackingState";
```

0 comments on commit 9968540

Please sign in to comment.