Skip to content

Commit 8241e68

Browse files
committed
updates
1 parent 0878898 commit 8241e68

File tree

3 files changed

+37
-17
lines changed

3 files changed

+37
-17
lines changed

articles/search/includes/quickstarts/search-get-started-vector-javascript.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ This search uses [SearchClient](/javascript/api/@azure/search-documents/searchcl
420420

421421
## Create a semantic hybrid search
422422

423-
Here's the last query in the collection. This hybrid query with semantic ranking is filtered to show only the hotels within a 500-kilometer radius of Washington D.C. You can set `vectorFilterMode` to null, which is equivalent to the default (`preFilter` for newer indexes and `postFilter` for older ones).
423+
Here's the last query in the collection.
424424

425425
This search uses [SearchClient](/javascript/api/@azure/search-documents/searchclient).[search](/javascript/api/@azure/search-documents/searchclient#@azure-search-documents-searchclient-search) and the [VectorQuery](/javascript/api/@azure/search-documents/vectorquery) and [SearchOptions](/javascript/api/@azure/search-documents/searchoptions).
426426

@@ -479,20 +479,33 @@ This search uses [SearchClient](/javascript/api/@azure/search-documents/searchcl
479479
Category: Suite
480480
```
481481

482-
The search finds three hotels, which are filtered by location and faceted by StateProvince and semantically reranked to promote results that are closest to the search string query (historic hotel walk to restaurants and shopping)
482+
## Clean up
483+
484+
When you're working in your own subscription, it's a good idea at the end of a project to identify whether you still need the resources you created. Resources left running can cost you money. You can delete resources individually or delete the resource group to delete the entire set of resources.
485+
486+
You can find and manage resources in the Azure portal by using the **All resources** or **Resource groups** link in the leftmost pane.
487+
488+
If you want to keep the search service, but delete the index and documents, you can delete the index programmatically.
489+
490+
1. Create a `deleteIndex.js` file in the `src` directory.
491+
1. Add the dependencies, environment variables, and code to delete the index.
492+
493+
:::code language="javascript" source="~/azure-search-javascript-samples/quickstart-vector-js/src/deleteIndex.js" :::
494+
1. Build and run the file:
483495

484-
You can think of the semantic ranking as a way to improve the relevance of search results by understanding the meaning behind the words in the query and the content of the documents. In this case, the semantic ranking helps to identify hotels that aren't only relevant to the keywords but also match the intent of the query:
496+
```console
497+
node -r dotenv/config dist/deleteIndex.js
498+
```
485499

486-
* **Without semantic ranking**, Nordick's Valley Motel is number one.
487-
* **With semantic ranking**, the machine comprehension models recognize that historic applies to "hotel, within walking distance to dining (restaurants) and shopping."
500+
You can think of the semantic ranking as a way to improve the relevance of search results by understanding the meaning behind the words in the query and the content of the documents. In this case, the semantic ranking helps to identify hotels that are not only relevant to the keywords but also match the intent of the query:
488501

489502
Key takeaways:
490503

491-
- Vector search is specified through the `vectorSearchOptions` property. Keyword search is specified through the `semanticSearchOptions` property.
492-
493-
- In a hybrid search, you can integrate vector search with full-text search over keywords. Filters, spell check, and semantic ranking apply to textual content only, and not vectors. In this final query, there's no semantic `answer` because the system didn't produce one that was sufficiently strong.
494-
495-
- Actual results include more detail, including semantic captions and highlights. Results were modified for readability. To get the full structure of the response, run the request in the REST client.
504+
- Vector search is specified through the `vectorSearchOptions` property. Keyword search is specified through the `semanticSearchOptions` property.
505+
506+
- In a hybrid search, you can integrate vector search with full-text search over keywords. Filters, spell check, and semantic ranking apply to textual content only, and not vectors. In this final query, there's no semantic `answer` because the system didn't produce one that was sufficiently strong.
507+
508+
- Actual results include more detail, including semantic captions and highlights. Results were modified for readability. To get the full structure of the response, run the request in the REST client.
496509

497510
## Clean up
498511

@@ -502,16 +515,17 @@ You can find and manage resources in the Azure portal by using the **All resourc
502515

503516
If you want to keep the search service, but delete the index and documents, you can delete the index programmatically.
504517

505-
1. Create a `deleteIndex.js` file in the `src` directory.
518+
1. Create a `deleteIndex.ts` file in the `src` directory.
506519
1. Add the dependencies, environment variables, and code to delete the index.
507520

508521
:::code language="javascript" source="~/azure-search-javascript-samples/quickstart-vector-js/src/deleteIndex.js" :::
509-
1. Build and run the file:
522+
1. Run the file:
510523

511524
```console
512525
node -r dotenv/config dist/deleteIndex.js
513526
```
514527

528+
515529
## Next steps
516530

517531
- Review the repository of code samples for vector search capabilities in Azure AI Search for [JavaScript](https://github.com/Azure/azure-search-vector-samples/tree/main/demo-javascript)

articles/search/includes/quickstarts/search-get-started-vector-typescript.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -525,11 +525,11 @@ This search uses [SearchClient](/javascript/api/@azure/search-documents/searchcl
525525

526526
Key takeaways:
527527

528-
- Vector search is specified through the `vectorSearchOptions` property. Keyword search is specified through the `semanticSearchOptions` property.
529-
530-
- In a hybrid search, you can integrate vector search with full-text search over keywords. Filters, spell check, and semantic ranking apply to textual content only, and not vectors. In this final query, there's no semantic `answer` because the system didn't produce one that was sufficiently strong.
531-
532-
- Actual results include more detail, including semantic captions and highlights. Results were modified for readability. To get the full structure of the response, run the request in the REST client.
528+
- Vector search is specified through the `vectorSearchOptions` property. Keyword search is specified through the `semanticSearchOptions` property.
529+
530+
- In a hybrid search, you can integrate vector search with full-text search over keywords. Filters, spell check, and semantic ranking apply to textual content only, and not vectors. In this final query, there's no semantic `answer` because the system didn't produce one that was sufficiently strong.
531+
532+
- Actual results include more detail, including semantic captions and highlights. Results were modified for readability. To get the full structure of the response, run the request in the REST client.
533533

534534
## Clean up
535535

articles/search/search-get-started-vector.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ zone_pivot_groups: search-get-started-vector-search
2020

2121
::: zone-end
2222

23+
::: zone pivot="javascript"
24+
25+
[!INCLUDE [JavaScript quickstart](includes/quickstarts/search-get-started-vector-javascript.md)]
26+
27+
::: zone-end
28+
2329
::: zone pivot="typescript"
2430

2531
[!INCLUDE [TypeScript quickstart](includes/quickstarts/search-get-started-vector-typescript.md)]

0 commit comments

Comments
 (0)