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: sdk/search/azure-search-documents/CHANGELOG.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,20 @@
1
1
# Release History
2
2
3
-
## 11.6.0-beta.7 (Unreleased)
3
+
## 11.6.0-beta.7 (2023-07-11)
4
4
5
5
### Features Added
6
6
7
+
- Added support for [Vector Search](https://learn.microsoft.com/azure/search/vector-search-overview) ([Examples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/VectorSearchExample.java)).
8
+
7
9
### Breaking Changes
8
10
9
-
### Bugs Fixed
11
+
- Deprecated `EntityRecognitionSkillVersion.V1` and `SentimentSkillVersion.V1`, and corresponding constructors in
12
+
`EntityRecognitionSkill` and `SentimentSkill`, use `EntityRecognitionSkillVersion.V3` and `SentimentSkillVersion.V3`
13
+
instead. See [Cognitive Search skill deprecated](https://learn.microsoft.com/azure/search/cognitive-search-skill-deprecated)
Copy file name to clipboardExpand all lines: sdk/search/azure-search-documents/README.md
+81-7Lines changed: 81 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,15 +95,20 @@ See [choosing a pricing tier](https://docs.microsoft.com/azure/search/search-sku
95
95
96
96
### Authenticate the client
97
97
98
-
In order to interact with the Azure Cognitive Search service you'll need to create an instance of the Search Client class.
99
-
To make this possible you will need,
98
+
To interact with the Search service, you'll need to create an instance of the appropriate client class: `SearchClient`
99
+
for searching indexed documents, `SearchIndexClient` for managing indexes, or `SearchIndexerClient` for crawling data
100
+
sources and loading search documents into an index. To instantiate a client object, you'll need an **endpoint** and
101
+
**API key**. You can refer to the documentation for more information on [supported authenticating approaches](https://learn.microsoft.com/azure/search/search-security-overview#authentication)
for your service. [The api-key is the sole mechanism for authenticating access to
105
-
your search service endpoint.](https://docs.microsoft.com/azure/search/search-security-api-keys)
106
-
You can obtain your api-key from the [Azure portal](https://portal.azure.com/) or via the Azure CLI:
106
+
You can get the **endpoint** and an **API key** from the Search service in the [Azure Portal](https://portal.azure.com/).
107
+
Please refer the [documentation](https://docs.microsoft.com/azure/search/search-security-api-keys) for instructions on
108
+
how to get an API key.
109
+
110
+
Alternatively, you can use the following [Azure CLI](https://learn.microsoft.com/cli/azure/) command to retrieve the
111
+
API key from the Search service:
107
112
108
113
```bash
109
114
az search admin-key show --service-name <mysearch> --resource-group <mysearch-rg>
@@ -188,6 +193,46 @@ SearchAsyncClient searchAsyncClient = new SearchClientBuilder()
188
193
.buildAsyncClient();
189
194
```
190
195
196
+
#### Create a client using Azure Active Directory authentication
197
+
198
+
You can also create a `SearchClient`, `SearchIndexClient`, or `SearchIndexerClient` using Azure Active Directory (AAD)
199
+
authentication. Your user or service principal must be assigned the "Search Index Data Reader" role.
200
+
Using the [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity/README.md#defaultazurecredential)
201
+
you can authenticate a service using Managed Identity or a service principal, authenticate as a developer working on an
202
+
application, and more all without changing code. Please refer the [documentation](https://learn.microsoft.com/azure/search/search-security-rbac?tabs=config-svc-portal%2Croles-portal%2Ctest-portal%2Ccustom-role-portal%2Cdisable-keys-portal)
203
+
for instructions on how to connect to Azure Cognitive Search using Azure role-based access control (Azure RBAC).
204
+
205
+
Before you can use the `DefaultAzureCredential`, or any credential type from [Azure.Identity](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity/README.md),
206
+
you'll first need to [install the Azure.Identity package](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity/README.md#include-the-package).
207
+
208
+
To use `DefaultAzureCredential` with a client ID and secret, you'll need to set the `AZURE_TENANT_ID`,
209
+
`AZURE_CLIENT_ID`, and `AZURE_CLIENT_SECRET` environment variables; alternatively, you can pass those values
210
+
to the `ClientSecretCredential` also in `azure-identity`.
211
+
212
+
Make sure you use the right namespace for `DefaultAzureCredential` at the top of your source file:
To get running with Azure Cognitive Search first create an index following this [guide][search-get-started-portal].
@@ -220,6 +265,35 @@ tables.)_ The `azure-search-documents` client library exposes operations on thes
220
265
*[Start indexers to automatically crawl data sources](https://docs.microsoft.com/rest/api/searchservice/indexer-operations)
221
266
*[Define AI powered Skillsets to transform and enrich your data](https://docs.microsoft.com/rest/api/searchservice/skillset-operations)
222
267
268
+
Azure Cognitive Search provides two powerful features:
269
+
270
+
### Semantic Search
271
+
272
+
Semantic search enhances the quality of search results for text-based queries. By enabling Semantic Search on your
273
+
search service, you can improve the relevance of search results in two ways:
274
+
275
+
- It applies secondary ranking to the initial result set, promoting the most semantically relevant results to the top.
276
+
- It extracts and returns captions and answers in the response, which can be displayed on a search page to enhance the
277
+
user's search experience.
278
+
279
+
To learn more about Semantic Search, you can refer to the [documentation](https://learn.microsoft.com/azure/search/vector-search-overview).
280
+
281
+
### Vector Search
282
+
283
+
Vector Search is an information retrieval technique that overcomes the limitations of traditional keyword-based search.
284
+
Instead of relying solely on lexical analysis and matching individual query terms, Vector Search utilizes machine
285
+
learning models to capture the contextual meaning of words and phrases. It represents documents and queries as vectors
286
+
in a high-dimensional space called an embedding. By understanding the intent behind the query, Vector Search can deliver
287
+
more relevant results that align with the user's requirements, even if the exact terms are not present in the document.
288
+
Moreover, Vector Search can be applied to various types of content, including images and videos, not just text.
289
+
290
+
To learn how to index vector fields and perform vector search, you can refer to the [sample](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/search/azure-search-documents/src/samples/java/com/azure/search/documents/VectorSearchExample.java).
291
+
This sample provides detailed guidance on indexing vector fields and demonstrates how to perform vector search.
292
+
293
+
Additionally, for more comprehensive information about Vector Search, including its concepts and usage, you can refer
294
+
to the [documentation](https://learn.microsoft.com/azure/search/vector-search-overview). The documentation provides
295
+
in-depth explanations and guidance on leveraging the power of Vector Search in Azure Cognitive Search.
296
+
223
297
## Examples
224
298
225
299
The following examples all use a simple [Hotel data set](https://github.com/Azure-Samples/azure-search-sample-data)
Copy file name to clipboardExpand all lines: sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/implementation/models/QueryResultDocumentSemanticFieldState.java
Copy file name to clipboardExpand all lines: sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/implementation/models/SearchRequest.java
Copy file name to clipboardExpand all lines: sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/models/EntityRecognitionSkill.java
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -44,10 +44,18 @@ public final class EntityRecognitionSkill extends SearchIndexerSkill {
44
44
45
45
/**
46
46
* Creates an instance of EntityRecognitionSkill class.
47
+
* <p>
48
+
* The instance of SentimentSkill uses {@link EntityRecognitionSkillVersion#V1}, to set the specific version of the
49
+
* skill use {@link #EntityRecognitionSkill(List, List, EntityRecognitionSkillVersion)}.
47
50
*
48
51
* @param inputs the inputs value to set.
49
52
* @param outputs the outputs value to set.
53
+
* @deprecated Use {@link #EntityRecognitionSkill(List, List, EntityRecognitionSkillVersion)} as
54
+
* {@link EntityRecognitionSkillVersion#V1} is deprecated. See
55
+
* <a href="https://learn.microsoft.com/azure/search/cognitive-search-skill-deprecated">skill deprecation</a> for
0 commit comments