You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/search/samples-dotnet.md
+30-13Lines changed: 30 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.author: heidist
9
9
ms.service: cognitive-search
10
10
ms.custom: devx-track-dotnet
11
11
ms.topic: conceptual
12
-
ms.date: 01/04/2023
12
+
ms.date: 07/26/2023
13
13
---
14
14
15
15
# C# samples for Azure Cognitive Search
@@ -36,6 +36,7 @@ Code samples from the Azure SDK development team demonstrate API usage. You can
36
36
|[FieldBuilderIgnore](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/search/Azure.Search.Documents/samples/Sample04_FieldBuilderIgnore.md)| Demonstrates a technique for working with unsupported data types. |
37
37
|[Indexing documents (push model)](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/search/Azure.Search.Documents/samples/Sample05_IndexingDocuments.md)| "Push" model indexing, where you send a JSON payload to an index on a service. |
38
38
|[Encryption key sample](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/search/Azure.Search.Documents/samples/Sample06_EncryptedIndex.md)| Demonstrates using a customer-managed encryption key to add an extra layer of protection over sensitive content. |
39
+
|[Vector search sample](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch.md)| Shows you how to index a vector field and perform vector search using the Azure SDK for .NET. Vector search is in preview. A beta version of azure.search.documents provides support for this preview feature. |
39
40
40
41
## Doc samples
41
42
@@ -51,24 +52,40 @@ Code samples from the Cognitive Search team demonstrate features and workflows.
51
52
|[DotNetHowTo](https://github.com/Azure-Samples/search-dotnet-getting-started/tree/master/DotNetHowTo)|[How to use the .NET client library](search-howto-dotnet-sdk.md)| Steps through the basic workflow, but in more detail and with discussion of API usage. |
52
53
|[DotNetHowToSynonyms](https://github.com/Azure-Samples/search-dotnet-getting-started/tree/master/DotNetHowToSynonyms)|[Example: Add synonyms in C#](search-synonyms-tutorial-sdk.md)| Synonym lists are used for query expansion, providing matchable terms that are external to an index. |
53
54
|[DotNetToIndexers](https://github.com/Azure-Samples/search-dotnet-getting-started/tree/master/DotNetHowToIndexers)|[Tutorial: Index Azure SQL data](search-indexer-tutorial.md)| Shows how to configure an Azure SQL indexer that has a schedule, field mappings, and parameters. |
54
-
|[DotNetHowToEncryptionUsingCMK](https://github.com/Azure-Samples/search-dotnet-getting-started/tree/master/DotNetHowToEncryptionUsingCMK)|[How to configure customer-managed keys for data encryption](search-security-manage-encryption-keys.md)| Shows how to create objects that are encrypted with a customer key. |
55
+
|[DotNetHowToEncryptionUsingCMK](https://github.com/Azure-Samples/search-dotnet-getting-started/tree/master/DotNetHowToEncryptionUsingCMK)|[How to configure customer-managed keys for data encryption](search-security-manage-encryption-keys.md)| Shows how to create objects that are encrypted with a Customer Key. |
55
56
| [multiple-data-sources](https://github.com/Azure-Samples/azure-search-dotnet-samples/tree/master/multiple-data-sources) | [Tutorial: Index from multiple data sources](tutorial-multiple-data-sources.md). | Merges content from two data sources into one search index.
56
57
|[Optimize-data-indexing](https://github.com/Azure-Samples/azure-search-dotnet-samples/tree/master/optimize-data-indexing)|[Tutorial: Optimize indexing with the push API](tutorial-optimize-indexing-push-api.md).| Demonstrates optimization techniques for pushing data into a search index. |
57
58
|[tutorial-ai-enrichment](https://github.com/Azure-Samples/azure-search-dotnet-samples/tree/master/tutorial-ai-enrichment)|[Tutorial: AI-generated searchable content from Azure blobs](cognitive-search-tutorial-blob-dotnet.md)| Shows how to configure an indexer and skillset. |
58
59
|[create-mvc-app](https://github.com/Azure-Samples/azure-search-dotnet-samples/tree/master/create-mvc-app)|[Tutorial: Add search to an ASP.NET Core (MVC) app](tutorial-csharp-create-mvc-app.md)| While most samples are console applications, this MVC sample uses a web page to front the sample Hotels index, demonstrating basic search, pagination, and other server-side behaviors.|
59
60
61
+
## Accelerators
62
+
63
+
An accelerator is an end-to-end solution that includes code and documentation that you can adapt for your own implementation of a specific scenario.
64
+
65
+
| Samples | Repository | Description |
66
+
|---------|------------|-------------|
67
+
|[Search + QnA Maker Accelerator](https://github.com/Azure-Samples/search-qna-maker-accelerator)|[search-qna-maker-accelerator](https://github.com/Azure-Samples/search-qna-maker-accelerator)| A [solution](https://techcommunity.microsoft.com/t5/azure-ai/qna-with-azure-cognitive-search/ba-p/2081381) combining the power of Search and QnA Maker. See the live [demo site](https://aka.ms/qnaWithAzureSearchDemo). |
68
+
|[Knowledge Mining Solution Accelerator](/samples/azure-samples/azure-search-knowledge-mining/azure-search-knowledge-mining/)|[azure-search-knowledge-mining](https://github.com/azure-samples/azure-search-knowledge-mining/tree/main/)| Includes templates, support files, and analytical reports to help you prototype an end-to-end knowledge mining solution. |
69
+
70
+
## Demos
71
+
72
+
A demo repo provides proof-of-concept source code for examples or scenarios shown in demonstrations. Demo solutions aren't designed for adaptation by customers.
73
+
74
+
| Samples | Repository | Description |
75
+
|---------|------------|-------------|
76
+
|[Covid-19 search app](https://github.com/liamca/covid19search/blob/master/README.md)|[covid19search](https://github.com/liamca/covid19search)| Source code repository for the Cognitive Search based [Covid-19 Search App](https://covid19search.azurewebsites.net/)|
77
+
|[JFK demo](https://github.com/Microsoft/AzureSearch_JFK_Files/blob/master/README.md)|[AzureSearch_JFK_Files](https://github.com/Microsoft/AzureSearch_JFK_Files)| Learn more about the [JFK solution](https://www.microsoft.com/ai/ai-lab-jfk-files). |
78
+
60
79
## Other samples
61
80
62
81
The following samples are also published by the Cognitive Search team, but aren't referenced in documentation. Associated readme files provide usage instructions.
63
82
64
-
| Samples | Description |
65
-
|---------|-------------|
66
-
|[Check storage](https://github.com/Azure-Samples/azure-search-dotnet-samples/blob/main/check-storage-usage/README.md)| Invokes an Azure function that checks search service storage on a schedule. |
67
-
|[Export an index](https://github.com/Azure-Samples/azure-search-dotnet-samples/blob/main/export-data/README.md)| C# console app that partitions and export a large index. |
68
-
|[Query multiple services](https://github.com/Azure-Samples/azure-search-dotnet-samples/tree/main/multiple-search-services)| Issue a single query across multiple search services and combine the results into a single page. |
69
-
|[Index Data Lake Gen2 using Azure AD](https://github.com/Azure-Samples/azure-search-dotnet-samples/blob/master/data-lake-gen2-acl-indexing/README.md)| Source code demonstrating indexer connections and indexing of Azure Data Lake Gen2 files and folders that are secured through Azure AD and role-based access controls. |
70
-
|[azure-search-power-skills](https://github.com/Azure-Samples/azure-search-power-skills)| Source code for consumable custom skills that you can incorporate in your won solutions. |
71
-
|[Knowledge Mining Solution Accelerator](/samples/azure-samples/azure-search-knowledge-mining/azure-search-knowledge-mining/)| Includes templates, support files, and analytical reports to help you prototype an end-to-end knowledge mining solution. |
72
-
|[Covid-19 Search App repository](https://github.com/liamca/covid19search)| Source code repository for the Cognitive Search based [Covid-19 Search App](https://covid19search.azurewebsites.net/)|
73
-
|[JFK](https://github.com/Microsoft/AzureSearch_JFK_Files)| Learn more about the [JFK solution](https://www.microsoft.com/ai/ai-lab-jfk-files). |
74
-
|[Search + QnA Maker Accelerator](https://github.com/Azure-Samples/search-qna-maker-accelerator)| A [solution](https://techcommunity.microsoft.com/t5/azure-ai/qna-with-azure-cognitive-search/ba-p/2081381) combining the power of Search and QnA Maker. See the live [demo site](https://aka.ms/qnaWithAzureSearchDemo). |
83
+
| Samples | Repository | Description |
84
+
|---------|------------|-------------|
85
+
|[Check storage](https://github.com/Azure-Samples/azure-search-dotnet-utilities/blob/main/check-storage-usage/README.md)|[azure-search-dotnet-utilities](https://github.com/Azure-Samples/azure-search-dotnet-utilities)| Invokes an Azure function that checks search service storage on a schedule. |
86
+
|[Export an index](https://github.com/Azure-Samples/azure-search-dotnet-utilities/blob/main/export-data/README.md)|[azure-search-dotnet-utilities](https://github.com/Azure-Samples/azure-search-dotnet-utilities)| C# console app that partitions and export a large index. |
87
+
|[Backup and restore an index](https://github.com/Azure-Samples/azure-search-dotnet-utilities/blob/main/index-backup-restore/README.md)|[azure-search-dotnet-utilities](https://github.com/Azure-Samples/azure-search-dotnet-utilities)| C# console app that copies an index from one service to another, and in the process, creates JSON files on your computer with the index schema and documents.|
88
+
|[Index Data Lake Gen2 using Azure AD](https://github.com/Azure-Samples/azure-search-dotnet-utilities/blob/master/data-lake-gen2-acl-indexing/README.md)|[azure-search-dotnet-utilities](https://github.com/Azure-Samples/azure-search-dotnet-utilities)| Source code demonstrating indexer connections and indexing of Azure Data Lake Gen2 files and folders that are secured through Azure AD and role-based access controls. |
89
+
|[Search aggregations](https://github.com/Azure-Samples/azure-search-dotnet-utilities/blob/main/search-aggregations/README.md)|[azure-search-dotnet-utilities](https://github.com/Azure-Samples/azure-search-dotnet-utilities)| Proof-of-concept source code that demonstrates how to obtain aggregations from a search index and then filter by them. |
90
+
|[Query multiple services](https://github.com/Azure-Samples/azure-search-dotnet-samples/tree/main/multiple-search-services)|[azure-search-dotnet-samples](https://github.com/Azure-Samples/azure-search-dotnet-samples)| Issue a single query across multiple search services and combine the results into a single page. |
91
+
|[Power Skills](https://github.com/Azure-Samples/azure-search-power-skills/blob/main/README.md)|[azure-search-power-skills](https://github.com/Azure-Samples/azure-search-power-skills)| Source code for consumable custom skills that you can incorporate in your won solutions. |
Copy file name to clipboardExpand all lines: articles/search/search-faq-frequently-asked-questions.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ sections:
75
75
answer: |
76
76
There's no native support for index management. Search indexes are considered downstream data structures, accepting content from other data sources that collect operational data. As such, there's no built-in support for backing up and restoring indexes because the expectation is that you would rebuild an index from source data if you deleted it, or wanted to move it.
77
77
78
-
However, if you want to move an index between search services, you can try the **index-backup-restore** sample code in this [Azure Cognitive Search .NET sample repo](https://github.com/Azure-Samples/azure-search-dotnet-samples).
78
+
However, if you want to move an index between search services, you can try the **index-backup-restore** sample code in this [Azure Cognitive Search .NET sample repo](https://github.com/Azure-Samples/azure-search-dotnet-utilities).
79
79
80
80
- question: |
81
81
Can I restore my index or service once it's deleted?
Copy file name to clipboardExpand all lines: articles/search/search-howto-index-azure-data-lake-storage.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ In this article, learn how to configure an [**indexer**](search-indexer-overview
17
17
18
18
This article supplements [**Create an indexer**](search-howto-create-indexers.md) with information that's specific to indexing from ADLS Gen2. It uses the REST APIs to demonstrate a three-part workflow common to all indexers: create a data source, create an index, create an indexer. Data extraction occurs when you submit the Create Indexer request.
19
19
20
-
For a code sample in C#, see [Index Data Lake Gen2 using Azure AD](https://github.com/Azure-Samples/azure-search-dotnet-samples/blob/master/data-lake-gen2-acl-indexing/README.md) on GitHub.
20
+
For a code sample in C#, see [Index Data Lake Gen2 using Azure AD](https://github.com/Azure-Samples/azure-search-dotnet-utilities/blob/master/data-lake-gen2-acl-indexing/README.md) on GitHub.
21
21
22
22
## Prerequisites
23
23
@@ -317,4 +317,4 @@ You can now [run the indexer](search-howto-run-reset-indexers.md), [monitor stat
317
317
318
318
+[Change detection and deletion detection](search-howto-index-changed-deleted-blobs.md)
319
319
+[Index large data sets](search-howto-large-index.md)
320
-
+[C# Sample: Index Data Lake Gen2 using Azure AD](https://github.com/Azure-Samples/azure-search-dotnet-samples/blob/master/data-lake-gen2-acl-indexing/README.md)
320
+
+[C# Sample: Index Data Lake Gen2 using Azure AD](https://github.com/Azure-Samples/azure-search-dotnet-utilities/blob/master/data-lake-gen2-acl-indexing/README.md)
Copy file name to clipboardExpand all lines: articles/search/search-howto-managed-identities-storage.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ You can use a system-assigned managed identity or a user-assigned managed identi
34
34
* You should be familiar with [indexer concepts](search-indexer-overview.md) and [configuration](search-howto-indexing-azure-blob-storage.md).
35
35
36
36
> [!TIP]
37
-
> For a code example in C#, see [Index Data Lake Gen2 using Azure AD](https://github.com/Azure-Samples/azure-search-dotnet-samples/blob/master/data-lake-gen2-acl-indexing/README.md) on GitHub.
37
+
> For a code example in C#, see [Index Data Lake Gen2 using Azure AD](https://github.com/Azure-Samples/azure-search-dotnet-utilities/blob/master/data-lake-gen2-acl-indexing/README.md) on GitHub.
38
38
39
39
## Create the data source
40
40
@@ -143,4 +143,4 @@ Azure storage accounts can be further secured using firewalls and virtual networ
*[C# Example: Index Data Lake Gen2 using Azure AD (GitHub)](https://github.com/Azure-Samples/azure-search-dotnet-samples/blob/master/data-lake-gen2-acl-indexing/README.md)
146
+
*[C# Example: Index Data Lake Gen2 using Azure AD (GitHub)](https://github.com/Azure-Samples/azure-search-dotnet-utilities/blob/master/data-lake-gen2-acl-indexing/README.md)
Copy file name to clipboardExpand all lines: articles/search/search-howto-reindex.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ The following table lists the modifications that require an index rebuild.
28
28
| Assign an analyzer to a field |[Analyzers](search-analyzers.md) are defined in an index and then assigned to fields. You can add a new analyzer definition to an index at any time, but you can only *assign* an analyzer when the field is created. This is true for both the **analyzer** and **indexAnalyzer** properties. The **searchAnalyzer** property is an exception (you can assign this property to an existing field). |
29
29
| Update or delete an analyzer definition in an index | You can't delete or change an existing analyzer configuration (analyzer, tokenizer, token filter, or char filter) in the index unless you rebuild the entire index. |
30
30
| Add a field to a suggester | If a field already exists and you want to add it to a [Suggesters](index-add-suggesters.md) construct, you must rebuild the index. |
31
-
| Switch tiers | In-place upgrades aren't supported. If you require more capacity, you must create a new service and rebuild your indexes from scratch. To help automate this process, you can use the **index-backup-restore** sample code in this [Azure Cognitive Search .NET sample repo](https://github.com/Azure-Samples/azure-search-dotnet-samples). This app will back up your index to a series of JSON files, and then recreate the index in a search service you specify.|
31
+
| Switch tiers | In-place upgrades aren't supported. If you require more capacity, you must create a new service and rebuild your indexes from scratch. To help automate this process, you can use the **index-backup-restore** sample code in this [Azure Cognitive Search .NET sample repo](https://github.com/Azure-Samples/azure-search-dotnet-utilities). This app will back up your index to a series of JSON files, and then recreate the index in a search service you specify.|
Copy file name to clipboardExpand all lines: articles/search/search-reliability.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -172,7 +172,7 @@ If you don't use indexers, you would use your application code to push objects a
172
172
173
173
## Back up and restore alternatives
174
174
175
-
A business continuity strategy for the data layer usually includes a restore-from-backup step. Because Azure Cognitive Search isn't a primary data storage solution, Microsoft doesn't provide a formal mechanism for self-service backup and restore. However, you can use the **index-backup-restore** sample code in this [Azure Cognitive Search .NET sample repo](https://github.com/Azure-Samples/azure-search-dotnet-samples) to back up your index definition and snapshot to a series of JSON files, and then use these files to restore the index, if needed. This tool can also move indexes between service tiers.
175
+
A business continuity strategy for the data layer usually includes a restore-from-backup step. Because Azure Cognitive Search isn't a primary data storage solution, Microsoft doesn't provide a formal mechanism for self-service backup and restore. However, you can use the **index-backup-restore** sample code in this [Azure Cognitive Search .NET sample repo](https://github.com/Azure-Samples/azure-search-dotnet-utilities) to back up your index definition and snapshot to a series of JSON files, and then use these files to restore the index, if needed. This tool can also move indexes between service tiers.
176
176
177
177
Otherwise, your application code used for creating and populating an index is the de facto restore option if you delete an index by mistake. To rebuild an index, you would delete it (assuming it exists), recreate the index in the service, and reload by retrieving data from your primary data store.
0 commit comments