Skip to content

Commit 5a617a5

Browse files
authored
[Search] Fix Cognitive Search Readme And Sample Issues (Azure#27117)
1 parent c93f504 commit 5a617a5

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

sdk/search/search-documents/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ main();
321321
In TypeScript, `SearchClient` takes a generic parameter that is the model shape of your index documents. This allows you to perform strongly typed lookup of fields returned in results. TypeScript is also able to check for fields returned when specifying a `select` parameter.
322322

323323
```ts
324-
import { SearchClient, AzureKeyCredential } from "@azure/search-documents";
324+
import { SearchClient, AzureKeyCredential, SelectFields } from "@azure/search-documents";
325325

326326
// An example schema for documents in the index
327327
interface Hotel {
@@ -335,7 +335,7 @@ interface Hotel {
335335
rooms?: Array<{
336336
beds?: number | null;
337337
description?: string | null;
338-
} | null;>
338+
} | null>;
339339
}
340340

341341
const client = new SearchClient<Hotel>(
@@ -404,10 +404,10 @@ Text embeddings can be queried using the `vector` search parameter.
404404
```js
405405
const { SearchClient, AzureKeyCredential, odata } = require("@azure/search-documents");
406406

407-
const client = new SearchClient("<endpoint>", "<indexName>", new AzureKeyCredential("<apiKey>"));
407+
const searchClient = new SearchClient("<endpoint>", "<indexName>", new AzureKeyCredential("<apiKey>"));
408408

409409
async function main() {
410-
const queryVector: number[] = [...]
410+
const queryVector = [...]
411411
const searchResults = await searchClient.search("*", {
412412
vector: {
413413
fields: ["descriptionVector"],

sdk/search/search-documents/samples-dev/skillSetOperations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ async function createSkillset(skillsetName: string, client: SearchIndexerClient)
2626
description: `Skillset description`,
2727
skills: [
2828
{
29-
odatatype: "#Microsoft.Skills.Text.EntityRecognitionSkill",
29+
odatatype: "#Microsoft.Skills.Text.V3.EntityRecognitionSkill",
3030
inputs: [
3131
{
3232
name: "text",

sdk/search/search-documents/samples/v12-beta/javascript/skillSetOperations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ async function createSkillset(skillsetName, client) {
2121
description: `Skillset description`,
2222
skills: [
2323
{
24-
odatatype: "#Microsoft.Skills.Text.EntityRecognitionSkill",
24+
odatatype: "#Microsoft.Skills.Text.V3.EntityRecognitionSkill",
2525
inputs: [
2626
{
2727
name: "text",

sdk/search/search-documents/samples/v12-beta/typescript/src/skillSetOperations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ async function createSkillset(skillsetName: string, client: SearchIndexerClient)
2626
description: `Skillset description`,
2727
skills: [
2828
{
29-
odatatype: "#Microsoft.Skills.Text.EntityRecognitionSkill",
29+
odatatype: "#Microsoft.Skills.Text.V3.EntityRecognitionSkill",
3030
inputs: [
3131
{
3232
name: "text",

0 commit comments

Comments
 (0)