Skip to content

Commit

Permalink
Search Code Changes for April Release (Azure#14620)
Browse files Browse the repository at this point in the history
* Search Code Changes for April Release

* Updated Version, Changelog & Regened to latest SHA

* Update Perf Test Dependency
  • Loading branch information
sarangan12 authored and vindicatesociety committed Apr 26, 2021
1 parent f184873 commit b70a09f
Show file tree
Hide file tree
Showing 23 changed files with 1,049 additions and 299 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 @@ -7,7 +7,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@azure/search-documents": "11.1.1",
"@azure/search-documents": "11.2.0-beta.1",
"@azure/identity": "^1.1.0",
"@azure/test-utils-perfstress": "^1.0.0",
"dotenv": "^8.2.0"
Expand Down
16 changes: 10 additions & 6 deletions sdk/search/search-documents/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Release History

## 11.1.1 (Unreleased)
## 11.2.0-beta.1 (2021-04-06)

- Added Support for new skills such as `CustomEntityLookupSkill`, `DocumentExtractionSkill`, etc. Please refer [#14620](https://github.com/Azure/azure-sdk-for-js/pull/14620) for further details.
- Added Support for new datasource `adlsgen2`. Please refer [#14620](https://github.com/Azure/azure-sdk-for-js/pull/14620) for further details.
- Added Support for normalizers `LexicalNormalizer` & `CustomNormalizer`. Please refer [#14620](https://github.com/Azure/azure-sdk-for-js/pull/14620) for further details.

## 11.1.0 (2021-02-11)

Expand Down Expand Up @@ -45,11 +49,6 @@
- [Breaking] In `ServiceCounters`, the `skillsetCounter` property has been removed.
- [Breaking] Modified the names of several properties. Please refer [#9321](https://github.com/Azure/azure-sdk-for-js/issues/9321) for a detailed list of renames.

## 11.0.0-preview.1 (2020-03-09)

- Initial implementation of the data-plane Cognitive Search Client. The version number starts at 11 to align with client libraries in other languages.
- This first preview has support for document operations on an index, such as querying and document management.

## 1.0.0-preview.4 (2020-06-08)

- [Breaking] Changed `ListIndexes` operation to a pageable operation.
Expand Down Expand Up @@ -84,3 +83,8 @@
- The type `IndexAction` was renamed to `IndexDocumentsAction`.
- [Breaking] Removed `SearchApiKeyCredential` and replaced with `AzureKeyCredential`.
- [Breaking] Search results accessed `byPage` now have an opaque `continuationToken` in place of `nextLink` and `nextPageParameters`.

## 11.0.0-preview.1 (2020-03-09)

- Initial implementation of the data-plane Cognitive Search Client. The version number starts at 11 to align with client libraries in other languages.
- This first preview has support for document operations on an index, such as querying and document management.
2 changes: 1 addition & 1 deletion sdk/search/search-documents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Once you have an api-key, you can use it as follows:
const {
SearchClient,
SearchIndexClient,
SearchServiceClient,
SearchIndexerClient,
AzureKeyCredential,
} = require("@azure/search-documents");

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.1.1",
"version": "11.2.0-beta.1",
"description": "Azure client library to use Cognitive Search for node.js and browser.",
"sdk-type": "client",
"main": "dist/index.js",
Expand Down
151 changes: 146 additions & 5 deletions sdk/search/search-documents/review/search-documents.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export interface BaseSearchIndexerSkill {
description?: string;
inputs: InputFieldMappingEntry[];
name?: string;
odatatype: "#Microsoft.Skills.Util.ConditionalSkill" | "#Microsoft.Skills.Text.KeyPhraseExtractionSkill" | "#Microsoft.Skills.Vision.OcrSkill" | "#Microsoft.Skills.Vision.ImageAnalysisSkill" | "#Microsoft.Skills.Text.LanguageDetectionSkill" | "#Microsoft.Skills.Util.ShaperSkill" | "#Microsoft.Skills.Text.MergeSkill" | "#Microsoft.Skills.Text.EntityRecognitionSkill" | "#Microsoft.Skills.Text.SentimentSkill" | "#Microsoft.Skills.Text.SplitSkill" | "#Microsoft.Skills.Text.TranslationSkill" | "#Microsoft.Skills.Custom.WebApiSkill";
odatatype: "#Microsoft.Skills.Util.ConditionalSkill" | "#Microsoft.Skills.Text.KeyPhraseExtractionSkill" | "#Microsoft.Skills.Vision.OcrSkill" | "#Microsoft.Skills.Vision.ImageAnalysisSkill" | "#Microsoft.Skills.Text.LanguageDetectionSkill" | "#Microsoft.Skills.Util.ShaperSkill" | "#Microsoft.Skills.Text.MergeSkill" | "#Microsoft.Skills.Text.EntityRecognitionSkill" | "#Microsoft.Skills.Text.SentimentSkill" | "#Microsoft.Skills.Text.SplitSkill" | "#Microsoft.Skills.Text.CustomEntityLookupSkill" | "#Microsoft.Skills.Text.TranslationSkill" | "#Microsoft.Skills.Util.DocumentExtractionSkill" | "#Microsoft.Skills.Custom.WebApiSkill";
outputs: OutputFieldMappingEntry[];
}

Expand Down Expand Up @@ -160,6 +160,9 @@ export type BM25Similarity = Similarity & {
// @public
export type CharFilter = MappingCharFilter | PatternReplaceCharFilter;

// @public
export type CharFilterName = string;

// @public
export type CjkBigramTokenFilter = BaseTokenFilter & {
odatatype: "#Microsoft.Azure.Search.CjkBigramTokenFilter";
Expand Down Expand Up @@ -216,7 +219,7 @@ export type ConditionalSkill = BaseSearchIndexerSkill & {
// @public
export interface CorsOptions {
allowedOrigins: string[];
maxAgeInSeconds?: number;
maxAgeInSeconds?: number | null;
}

// @public
Expand Down Expand Up @@ -272,6 +275,50 @@ export interface CustomAnalyzer {
tokenizerName: string;
}

// @public
export interface CustomEntity {
accentSensitive?: boolean | null;
aliases?: CustomEntityAlias[] | null;
caseSensitive?: boolean | null;
defaultAccentSensitive?: boolean | null;
defaultCaseSensitive?: boolean | null;
defaultFuzzyEditDistance?: number | null;
description?: string | null;
fuzzyEditDistance?: number | null;
id?: string | null;
name: string;
subtype?: string | null;
type?: string | null;
}

// @public
export interface CustomEntityAlias {
accentSensitive?: boolean | null;
caseSensitive?: boolean | null;
fuzzyEditDistance?: number | null;
text: string;
}

// @public
export type CustomEntityLookupSkill = BaseSearchIndexerSkill & {
odatatype: "#Microsoft.Skills.Text.CustomEntityLookupSkill";
defaultLanguageCode?: CustomEntityLookupSkillLanguage | null;
entitiesDefinitionUri?: string | null;
inlineEntitiesDefinition?: CustomEntity[] | null;
globalDefaultCaseSensitive?: boolean | null;
globalDefaultAccentSensitive?: boolean | null;
globalDefaultFuzzyEditDistance?: number | null;
};

// @public
export type CustomEntityLookupSkillLanguage = string;

// @public
export type CustomNormalizer = LexicalNormalizer & {
tokenFilters?: TokenFilterName[];
charFilters?: CharFilterName[];
};

// @public
export type DataChangeDetectionPolicy = HighWaterMarkChangeDetectionPolicy | SqlIntegratedChangeTrackingPolicy;

Expand Down Expand Up @@ -342,6 +389,16 @@ export interface DistanceScoringParameters {
referencePointParameter: string;
}

// @public
export type DocumentExtractionSkill = BaseSearchIndexerSkill & {
odatatype: "#Microsoft.Skills.Util.DocumentExtractionSkill";
parsingMode?: string | null;
dataToExtract?: string | null;
configuration?: {
[propertyName: string]: any;
} | null;
};

// @public
export interface EdgeNGramTokenFilter {
maxGram?: number;
Expand Down Expand Up @@ -601,6 +658,7 @@ export type KeyPhraseExtractionSkill = BaseSearchIndexerSkill & {
odatatype: "#Microsoft.Skills.Text.KeyPhraseExtractionSkill";
defaultLanguageCode?: KeyPhraseExtractionSkillLanguage;
maxKeyPhraseCount?: number | null;
modelVersion?: string | null;
};

// @public
Expand Down Expand Up @@ -747,11 +805,29 @@ export const enum KnownBlobIndexerPDFTextRotationAlgorithm {
None = "none"
}

// @public
export const enum KnownCharFilterName {
HtmlStrip = "html_strip"
}

// @public
export enum KnownCharFilterNames {
HtmlStrip = "html_strip"
}

// @public
export const enum KnownCustomEntityLookupSkillLanguage {
Da = "da",
De = "de",
En = "en",
Es = "es",
Fi = "fi",
Fr = "fr",
It = "it",
Ko = "ko",
Pt = "pt"
}

// @public
export const enum KnownEntityCategory {
Datetime = "datetime",
Expand Down Expand Up @@ -922,6 +998,15 @@ export const enum KnownLexicalAnalyzerName {
ZhHantMicrosoft = "zh-Hant.microsoft"
}

// @public
export const enum KnownLexicalNormalizerName {
AsciiFolding = "asciifolding",
Elision = "elision",
Lowercase = "lowercase",
Standard = "standard",
Uppercase = "uppercase"
}

// @public
export const enum KnownOcrSkillLanguage {
Ar = "ar",
Expand Down Expand Up @@ -966,6 +1051,7 @@ export const enum KnownRegexFlags {

// @public
export const enum KnownSearchIndexerDataSourceType {
AdlsGen2 = "adlsgen2",
AzureBlob = "azureblob",
AzureSql = "azuresql",
AzureTable = "azuretable",
Expand Down Expand Up @@ -1078,6 +1164,44 @@ export const enum KnownTextTranslationSkillLanguage {
ZhHant = "zh-Hant"
}

// @public
export const enum KnownTokenFilterName {
Apostrophe = "apostrophe",
ArabicNormalization = "arabic_normalization",
AsciiFolding = "asciifolding",
CjkBigram = "cjk_bigram",
CjkWidth = "cjk_width",
Classic = "classic",
CommonGram = "common_grams",
EdgeNGram = "edgeNGram_v2",
Elision = "elision",
GermanNormalization = "german_normalization",
HindiNormalization = "hindi_normalization",
IndicNormalization = "indic_normalization",
KeywordRepeat = "keyword_repeat",
KStem = "kstem",
Length = "length",
Limit = "limit",
Lowercase = "lowercase",
NGram = "nGram_v2",
PersianNormalization = "persian_normalization",
Phonetic = "phonetic",
PorterStem = "porter_stem",
Reverse = "reverse",
ScandinavianFoldingNormalization = "scandinavian_folding",
ScandinavianNormalization = "scandinavian_normalization",
Shingle = "shingle",
Snowball = "snowball",
SoraniNormalization = "sorani_normalization",
Stemmer = "stemmer",
Stopwords = "stopwords",
Trim = "trim",
Truncate = "truncate",
Unique = "unique",
Uppercase = "uppercase",
WordDelimiter = "word_delimiter"
}

// @public
export enum KnownTokenFilterNames {
Apostrophe = "apostrophe",
Expand Down Expand Up @@ -1147,6 +1271,8 @@ export const enum KnownVisualFeature {
// @public
export type LanguageDetectionSkill = BaseSearchIndexerSkill & {
odatatype: "#Microsoft.Skills.Text.LanguageDetectionSkill";
defaultCountryHint?: string | null;
modelVersion?: string | null;
};

// @public
Expand All @@ -1162,6 +1288,15 @@ export type LexicalAnalyzer = CustomAnalyzer | PatternAnalyzer | LuceneStandardA
// @public
export type LexicalAnalyzerName = string;

// @public
export interface LexicalNormalizer {
name: string;
odatatype: string;
}

// @public
export type LexicalNormalizerName = string;

// @public
export type LexicalTokenizer = ClassicTokenizer | EdgeNGramTokenizer | KeywordTokenizer | MicrosoftLanguageTokenizer | MicrosoftLanguageStemmingTokenizer | NGramTokenizer | PathHierarchyTokenizer | PatternTokenizer | LuceneStandardTokenizer | UaxUrlEmailTokenizer;

Expand Down Expand Up @@ -1356,7 +1491,7 @@ export type PhoneticTokenFilter = BaseTokenFilter & {
};

// @public
export type QueryType = "simple" | "full";
export type QueryType = "simple" | "full" | "semantic";

// @public
export type RegexFlags = string;
Expand Down Expand Up @@ -1451,6 +1586,7 @@ export interface SearchIndex {
etag?: string;
fields: SearchField[];
name: string;
normalizers?: LexicalNormalizer[];
scoringProfiles?: ScoringProfile[];
similarity?: SimilarityAlgorithm;
suggesters?: SearchSuggester[];
Expand Down Expand Up @@ -1571,7 +1707,7 @@ export interface SearchIndexerLimits {
}

// @public
export type SearchIndexerSkill = ConditionalSkill | KeyPhraseExtractionSkill | OcrSkill | ImageAnalysisSkill | LanguageDetectionSkill | ShaperSkill | MergeSkill | EntityRecognitionSkill | SentimentSkill | SplitSkill | TextTranslationSkill | WebApiSkill;
export type SearchIndexerSkill = ConditionalSkill | KeyPhraseExtractionSkill | OcrSkill | ImageAnalysisSkill | LanguageDetectionSkill | ShaperSkill | MergeSkill | EntityRecognitionSkill | SentimentSkill | SplitSkill | CustomEntityLookupSkill | TextTranslationSkill | DocumentExtractionSkill | WebApiSkill;

// @public
export interface SearchIndexerSkillset {
Expand Down Expand Up @@ -1723,7 +1859,7 @@ export interface SearchResourceEncryptionKey {
export type SearchResult<T> = {
readonly score: number;
readonly highlights?: {
[propertyName: string]: string[];
[k in keyof T]?: string[];
};
document: T;
};
Expand Down Expand Up @@ -1756,6 +1892,7 @@ export interface ServiceCounters {
documentCounter: ResourceCounter;
indexCounter: ResourceCounter;
indexerCounter: ResourceCounter;
skillsetCounter: ResourceCounter;
storageSizeCounter: ResourceCounter;
synonymMapCounter: ResourceCounter;
}
Expand Down Expand Up @@ -1801,6 +1938,7 @@ export interface SimpleField {
indexAnalyzerName?: LexicalAnalyzerName;
key?: boolean;
name: string;
normalizerName?: LexicalNormalizerName;
searchable?: boolean;
searchAnalyzerName?: LexicalAnalyzerName;
sortable?: boolean;
Expand Down Expand Up @@ -1955,6 +2093,9 @@ export type TokenCharacterKind = "letter" | "digit" | "whitespace" | "punctuatio
// @public
export type TokenFilter = AsciiFoldingTokenFilter | CjkBigramTokenFilter | CommonGramTokenFilter | DictionaryDecompounderTokenFilter | EdgeNGramTokenFilter | ElisionTokenFilter | KeepTokenFilter | KeywordMarkerTokenFilter | LengthTokenFilter | LimitTokenFilter | NGramTokenFilter | PatternCaptureTokenFilter | PatternReplaceTokenFilter | PhoneticTokenFilter | ShingleTokenFilter | SnowballTokenFilter | StemmerTokenFilter | StemmerOverrideTokenFilter | StopwordsTokenFilter | SynonymTokenFilter | TruncateTokenFilter | UniqueTokenFilter | WordDelimiterTokenFilter;

// @public
export type TokenFilterName = string;

// @public
export type TruncateTokenFilter = BaseTokenFilter & {
odatatype: "#Microsoft.Azure.Search.TruncateTokenFilter";
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.1.1";
export const SDK_VERSION: string = "11.2.0-beta.1";
Loading

0 comments on commit b70a09f

Please sign in to comment.