From 8e1d127114f3197d74bd86dd2e401b4cde7d8da1 Mon Sep 17 00:00:00 2001 From: Daniel Getu Date: Wed, 14 Feb 2024 17:25:02 +0000 Subject: [PATCH] Fix invalid interface declarations in samples and README --- sdk/search/search-documents/README.md | 6 +++--- sdk/search/search-documents/samples-dev/interfaces.ts | 8 ++++---- .../samples/v12-beta/typescript/src/interfaces.ts | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sdk/search/search-documents/README.md b/sdk/search/search-documents/README.md index ea4102243066..1205f66565a3 100644 --- a/sdk/search/search-documents/README.md +++ b/sdk/search/search-documents/README.md @@ -17,7 +17,7 @@ The Azure AI Search service is well suited for the following application scenari * In a search client application, implement query logic and user experiences similar to commercial web search engines and chat-style apps. -Use the Azure.Search.Documents client library to: +Use the @azure/search-documents client library to: * Submit queries using vector, keyword, and hybrid query forms. * Implement filtered queries for metadata, geospatial search, faceted navigation, @@ -349,14 +349,14 @@ interface Hotel { hotelId?: string; hotelName?: string | null; description?: string | null; - descriptionVector?: Array | null; + descriptionVector?: Array; parkingIncluded?: boolean | null; lastRenovationDate?: Date | null; rating?: number | null; rooms?: Array<{ beds?: number | null; description?: string | null; - } | null>; + }>; } const client = new SearchClient( diff --git a/sdk/search/search-documents/samples-dev/interfaces.ts b/sdk/search/search-documents/samples-dev/interfaces.ts index 9a75788ca0a2..494148e11c3c 100644 --- a/sdk/search/search-documents/samples-dev/interfaces.ts +++ b/sdk/search/search-documents/samples-dev/interfaces.ts @@ -14,11 +14,11 @@ export interface Hotel { hotelId?: string; hotelName?: string | null; description?: string | null; - descriptionVectorEn?: number[] | null; - descriptionVectorFr?: number[] | null; + descriptionVectorEn?: number[]; + descriptionVectorFr?: number[]; descriptionFr?: string | null; category?: string | null; - tags?: string[] | null; + tags?: string[]; parkingIncluded?: boolean | null; smokingAllowed?: boolean | null; lastRenovationDate?: Date | null; @@ -40,5 +40,5 @@ export interface Hotel { sleepsCount?: number | null; smokingAllowed?: boolean | null; tags?: string[] | null; - }> | null; + }>; } diff --git a/sdk/search/search-documents/samples/v12-beta/typescript/src/interfaces.ts b/sdk/search/search-documents/samples/v12-beta/typescript/src/interfaces.ts index fc116d4805ed..f6ac5440b95e 100644 --- a/sdk/search/search-documents/samples/v12-beta/typescript/src/interfaces.ts +++ b/sdk/search/search-documents/samples/v12-beta/typescript/src/interfaces.ts @@ -11,11 +11,11 @@ export interface Hotel { hotelId?: string; hotelName?: string | null; description?: string | null; - descriptionVectorEn?: number[] | null; - descriptionVectorFr?: number[] | null; + descriptionVectorEn?: number[]; + descriptionVectorFr?: number[]; descriptionFr?: string | null; category?: string | null; - tags?: string[] | null; + tags?: string[]; parkingIncluded?: boolean | null; smokingAllowed?: boolean | null; lastRenovationDate?: Date | null; @@ -37,5 +37,5 @@ export interface Hotel { sleepsCount?: number | null; smokingAllowed?: boolean | null; tags?: string[] | null; - }> | null; + }>; }