Skip to content

Commit d7854b6

Browse files
Merge pull request #233584 from HeidiSteen/heidist-refresh
[azure search] Update preview statement for SharePoint Online indexer
2 parents e0b2e2a + 232088d commit d7854b6

File tree

3 files changed

+25
-18
lines changed

3 files changed

+25
-18
lines changed

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

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ Before you begin, have the following tools and services:
2626

2727
+ An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/).
2828

29-
+ An Azure Cognitive Search service. [Create a service](search-create-service-portal.md) or [find an existing service](https://portal.azure.com/#blade/HubsExtension/BrowseResourceBlade/resourceType/Microsoft.Search%2FsearchServices). You can use a free service for this quickstart.
29+
+ An Azure Cognitive Search service. [Create a service](search-create-service-portal.md) or [find an existing service](https://portal.azure.com/#blade/HubsExtension/BrowseResourceBlade/resourceType/Microsoft.Search%2FsearchServices). You can use a free service for this quickstart.
3030

3131
+ [Visual Studio](https://visualstudio.microsoft.com/downloads/), any edition. Sample code was tested on the free Community edition of Visual Studio 2019.
3232

3333
When setting up your project, you'll download the [Azure.Search.Documents NuGet package](https://www.nuget.org/packages/Azure.Search.Documents/).
3434

3535
Azure SDK for .NET conforms to [.NET Standard 2.0](/dotnet/standard/net-standard#net-implementation-support), which means .NET Framework 4.6.1 and .NET Core 2.1 as minimum requirements.
36+
3637
## Set up your project
3738

3839
Assemble service connection information, and then start Visual Studio to create a new Console App project that can run on. Select NET Core 3.1 for the run time.
@@ -57,7 +58,7 @@ After the project is created, add the client library. The [Azure.Search.Document
5758

5859
1. Start Visual Studio and create a .NET Core console application.
5960

60-
1. In **Tools** > **NuGet Package Manager**, select **Manage NuGet Packages for Solution...**.
61+
1. In **Tools** > **NuGet Package Manager**, select **Manage NuGet Packages for Solution...**.
6162

6263
1. Select **Browse**.
6364

@@ -157,7 +158,7 @@ In this example, synchronous methods of the Azure.Search.Documents library are u
157158
158159
+ `SearchableField` must be a string, and is always searchable and retrievable. Other attributes are off by default, but can be enabled. Because this field type is searchable, it supports synonyms and the full complement of analyzer properties. For more information, see the [SearchableFieldAttribute.cs](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/search/Azure.Search.Documents/src/Indexes/SearchableFieldAttribute.cs) in source code.
159160
160-
Whether you use the basic `SearchField` API or either one of the helper models, you must explicitly enable filter, facet, and sort attributes. For example, [IsFilterable](/dotnet/api/azure.search.documents.indexes.models.searchfield.isfilterable), [IsSortable](/dotnet/api/azure.search.documents.indexes.models.searchfield.issortable), and [IsFacetable](/dotnet/api/azure.search.documents.indexes.models.searchfield.isfacetable) must be explicitly attributed, as shown in the sample above.
161+
Whether you use the basic `SearchField` API or either one of the helper models, you must explicitly enable filter, facet, and sort attributes. For example, [IsFilterable](/dotnet/api/azure.search.documents.indexes.models.searchfield.isfilterable), [IsSortable](/dotnet/api/azure.search.documents.indexes.models.searchfield.issortable), and [IsFacetable](/dotnet/api/azure.search.documents.indexes.models.searchfield.isfacetable) must be explicitly attributed, as shown in the sample above.
161162

162163
1. Add a second empty class definition to your project: **Address.cs**. Copy the following code into the class.
163164

@@ -212,7 +213,7 @@ In this example, synchronous methods of the Azure.Search.Documents library are u
212213

213214
Azure Cognitive Search searches over content stored in the service. In this step, you'll load JSON documents that conform to the hotel index you just created.
214215

215-
In Azure Cognitive Search, search documents are data structures that are both inputs to indexing and outputs from queries. As obtained from an external data source, document inputs might be rows in a database, blobs in Blob storage, or JSON documents on disk. In this example, we're taking a shortcut and embedding JSON documents for four hotels in the code itself.
216+
In Azure Cognitive Search, search documents are data structures that are both inputs to indexing and outputs from queries. As obtained from an external data source, document inputs might be rows in a database, blobs in Blob storage, or JSON documents on disk. In this example, we're taking a shortcut and embedding JSON documents for four hotels in the code itself.
216217

217218
When uploading documents, you must use an [IndexDocumentsBatch](/dotnet/api/azure.search.documents.models.indexdocumentsbatch-1) object. An `IndexDocumentsBatch` object contains a collection of [Actions](/dotnet/api/azure.search.documents.models.indexdocumentsbatch-1.actions), each of which contains a document and a property telling Azure Cognitive Search what action to perform ([upload, merge, delete, and mergeOrUpload](search-what-is-data-import.md#indexing-actions)).
218219

@@ -404,7 +405,7 @@ The [SearchResults](/dotnet/api/azure.search.documents.models.searchresults-1) c
404405
WriteDocuments(response);
405406
```
406407

407-
1. In the second query, search on a term, add a filter that selects documents where Rating is greater than 4, and then sort by Rating in descending order. Filter is a boolean expression that is evaluated over [IsFilterable](/dotnet/api/azure.search.documents.indexes.models.searchfield.isfilterable) fields in an index. Filter queries either include or exclude values. As such, there's no relevance score associated with a filter query.
408+
1. In the second query, search on a term, add a filter that selects documents where Rating is greater than 4, and then sort by Rating in descending order. Filter is a boolean expression that is evaluated over [IsFilterable](/dotnet/api/azure.search.documents.indexes.models.searchfield.isfilterable) fields in an index. Filter queries either include or exclude values. As such, there's no relevance score associated with a filter query.
408409

409410
```csharp
410411
// Query 2
@@ -443,7 +444,7 @@ The [SearchResults](/dotnet/api/azure.search.documents.models.searchresults-1) c
443444
WriteDocuments(response);
444445
```
445446

446-
1. The fourth query demonstrates facets, which can be used to structure a faceted navigation structure.
447+
1. The fourth query demonstrates facets, which can be used to structure a faceted navigation structure.
447448

448449
```csharp
449450
// Query 4
@@ -485,6 +486,7 @@ The [SearchResults](/dotnet/api/azure.search.documents.models.searchresults-1) c
485486
var autoresponse = srchclient.Autocomplete("sa", "sg");
486487
WriteDocuments(autoresponse);
487488
```
489+
488490
1. Add **RunQueries** to Main().
489491

490492
```csharp
@@ -503,7 +505,7 @@ Full text search and filters are performed using the [SearchClient.Search](/dotn
503505

504506
## Run the program
505507

506-
Press F5 to rebuild the app and run the program in its entirety.
508+
Press F5 to rebuild the app and run the program in its entirety.
507509

508510
Output includes messages from [Console.WriteLine](/dotnet/api/system.console.writeline), with the addition of query information and results.
509511

@@ -513,7 +515,7 @@ When you're working in your own subscription, it's a good idea at the end of a p
513515

514516
You can find and manage resources in the portal, using the **All resources** or **Resource groups** link in the left-navigation pane.
515517

516-
If you're using a free service, remember that you're limited to three indexes, indexers, and data sources. You can delete individual items in the portal to stay under the limit.
518+
If you're using a free service, remember that you're limited to three indexes, indexers, and data sources. You can delete individual items in the portal to stay under the limit.
517519

518520
## Next steps
519521

articles/search/search-howto-index-sharepoint-online.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ ms.date: 04/04/2023
1414

1515
# Index data from SharePoint document libraries
1616

17-
> [!IMPORTANT]
18-
> SharePoint indexer support is currently in public preview under [Supplemental Terms of Use](https://azure.microsoft.com/support/legal/preview-supplemental-terms/). [Request access](https://aka.ms/azure-cognitive-search/indexer-preview) to this feature, and after access is enabled, use a [preview REST API (2020-06-30-preview or later)](search-api-preview.md) to index your content. There is currently limited portal support and no .NET SDK support.
17+
> [!IMPORTANT]
18+
> SharePoint indexer support is in public preview. It's offered "as-is", under [Supplemental Terms of Use](https://azure.microsoft.com/support/legal/preview-supplemental-terms/). Preview features aren't recommended for production workloads and aren't guaranteed to become generally available.
19+
>
20+
>To use this preview, [request access](https://aka.ms/azure-cognitive-search/indexer-preview), and after access is enabled, use a [preview REST API (2020-06-30-preview or later)](search-api-preview.md) to index your content. There is currently limited portal support and no .NET SDK support.
1921
2022
This article explains how to configure a [search indexer](search-indexer-overview.md) to index documents stored in SharePoint document libraries for full text search in Azure Cognitive Search. Configuration steps are followed by a deeper exploration of behaviors and scenarios you're likely to encounter.
2123

22-
2324
## Functionality
2425

2526
An indexer in Azure Cognitive Search is a crawler that extracts searchable data and metadata from a data source. The SharePoint indexer will connect to your SharePoint site and index documents from one or more document libraries. The indexer provides the following functionality:

articles/search/tutorial-csharp-create-mvc-app.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,20 @@ For the connection, the app presents a query API key to your fully qualified sea
6363

6464
Modify `appsettings.json` to specify your search service and [query API key](search-security-api-keys.md).
6565

66-
```json
67-
{
68-
"SearchServiceName": "https://<YOUR-SEARCH-SERVICE-NAME>.search.windows.net",
69-
"SearchServiceQueryApiKey": "<YOUR-SEARCH-SERVICE-QUERY-API-KEY>"
70-
}
71-
```
66+
```json
67+
{
68+
"SearchServiceUri": "<YOUR-SEARCH-SERVICE-URL>",
69+
"SearchServiceQueryApiKey": "<YOUR-SEARCH-SERVICE-QUERY-API-KEY>"
70+
}
71+
```
72+
73+
You can get the [service URL and API key](search-get-started-dotnet.md#copy-a-key-and-endpoint) from the portal. Because this code is querying an index and not creating one, you can use a query key instead of an admin key.
74+
75+
Make sure to specify the search service that has the hotels-sample-index.
7276

7377
## Add models
7478

75-
In this step, create models that represent the schema of the hotels-search-index.
79+
In this step, create models that represent the schema of the hotels-sample-index.
7680

7781
1. In Solution explorer, right-select **Models** and add a new class named "Hotel" for the following code:
7882

0 commit comments

Comments
 (0)