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/search-get-started-rest.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,15 +69,15 @@ If you're not familiar with the REST client for Visual Studio Code, this section
69
69
70
70
:::image type="content" source="media/search-get-started-rest/rest-client-request-setup.png" lightbox="media/search-get-started-rest/rest-client-request-setup.png" alt-text="Screenshot of a REST client configured for a search service request.":::
71
71
72
-
**Key points:**
73
-
74
-
+ Parameters are specified using an `@` prefix.
75
-
+ `###` designates a REST call. The next line contains the request, which must include `HTTP/1.1`.
76
-
+ `Send request` should appear above the request.
72
+
**Key points:**
73
+
74
+
+ Parameters are specified using an `@` prefix.
75
+
+ `###` designates a REST call. The next line contains the request, which must include `HTTP/1.1`.
76
+
+ `Send request` should appear above the request.
77
77
78
78
## Create an index
79
79
80
-
Add a second request to create a search index. [Create Index (REST)](/rest/api/searchservice/create-index) creates a search index and sets up the physical data structures on your search service.
80
+
Add a second request to your `.rest` file. [Create Index (REST)](/rest/api/searchservice/create-index) creates a search index and sets up the physical data structures on your search service.
81
81
82
82
1. Paste in the following example to create the hotels-quickstart index on your search service.
Copy file name to clipboardExpand all lines: articles/search/search-get-started-vector.md
+14-30Lines changed: 14 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
34
34
35
35
+ Optionally, to run the query example that invokes [semantic reranking](semantic-search-overview.md), your search service must be Basic tier or higher, with [semantic ranking enabled](semantic-how-to-enable-disable.md).
36
36
37
-
+ Optionally, an [Azure OpenAI](https://aka.ms/oai/access) resource with a deployment of **text-embedding-ada-002**. The quickstart includes an optional step for generating new text embeddings, but we provide existing embeddings so that you can skip this step.
37
+
+ Optionally, an [Azure OpenAI](https://aka.ms/oai/access) resource with a deployment of **text-embedding-ada-002**. The source `.rest` file includes an optional step for generating new text embeddings, but we provide existing embeddings so that you can omit this dependency.
38
38
39
39
## Copy a key and URL
40
40
@@ -48,22 +48,6 @@ REST calls require the search service endpoint and an API key on every request.
48
48
49
49
A valid API key establishes trust, on a per request basis, between the application sending the request and the search service handling it.
50
50
51
-
<!-- ## About the sample data and queries
52
-
53
-
Sample data consists of text and vector descriptions for seven fictitious hotels.
54
-
55
-
+ Textual data is used for keyword search, semantic ranking, and capabilities that depend on text (filters, facets, and sorting).
56
-
57
-
+ Vector data (text embeddings) is used for vector queries. Currently, Azure AI Search doesn't generate vectors for you in the generally available REST APIs and SDKs. For this quickstart, vector data was generated previously and copied into the "Upload Documents" request and into the query requests.
58
-
59
-
To create vector query strings, we used the **Generate Embedding** request to an [Azure OpenAI](https://aka.ms/oai/access) resource. If you want to formulate your own vector queries against the sample data, provide your Azure OpenAI connection information in the Postman collection variables. Your Azure OpenAI service must have a deployment of an embedding model that's identical to the one used to generate embeddings in your search corpus.
60
-
61
-
For this quickstart, the following parameters were used:
62
-
63
-
+ Model name: **text-embedding-ada-002**
64
-
+ Model version: **2**
65
-
+ API version: **2023-08-01-preview**.
66
-
-->
67
51
## Create a vector index
68
52
69
53
[Create Index (REST)](/rest/api/searchservice/create-index) creates a vector index and sets up the physical data structures on your search service.
@@ -228,24 +212,24 @@ The index schema is organized around hotels content. Sample data consists of vec
228
212
229
213
1. Select **Send request**. You should have an `HTTP/1.1 201 Created` response and the response body should include the JSON representation of the index schema.
230
214
231
-
**Key points:**
215
+
**Key points:**
232
216
233
-
+ The `"fields"` collection includes a required key field, text and vector fields (such as `"Description"`, `"DescriptionVector"`) for text and vector search. Colocating vector and nonvector fields in the same index enables hybrid queries. For instance, you can combine filters, text search with semantic ranking, and vectors into a single query operation.
217
+
+ The `"fields"` collection includes a required key field, text and vector fields (such as `"Description"`, `"DescriptionVector"`) for text and vector search. Colocating vector and nonvector fields in the same index enables hybrid queries. For instance, you can combine filters, text search with semantic ranking, and vectors into a single query operation.
234
218
235
-
+ Vector fields must be `"type": "Collection(Edm.Single)"` with `"dimensions"` and `"vectorSearchProfile"` properties.
219
+
+ Vector fields must be `"type": "Collection(Edm.Single)"` with `"dimensions"` and `"vectorSearchProfile"` properties.
236
220
237
-
+ The `"vectorSearch"` section is an array of Approximate Nearest Neighbors (ANN) algorithm configurations and profiles. Supported algorithms include HNSW and exhaustive KNN. See [Relevance scoring in vector search](vector-search-ranking.md) for details.
221
+
+ The `"vectorSearch"` section is an array of Approximate Nearest Neighbors (ANN) algorithm configurations and profiles. Supported algorithms include HNSW and exhaustive KNN. See [Relevance scoring in vector search](vector-search-ranking.md) for details.
238
222
239
-
+ [Optional]: The `"semantic"` configuration enables reranking of search results. You can rerank results in queries of type `"semantic"` for string fields that are specified in the configuration. See [Semantic ranking overview](semantic-search-overview.md) to learn more.
223
+
+ [Optional]: The `"semantic"` configuration enables reranking of search results. You can rerank results in queries of type `"semantic"` for string fields that are specified in the configuration. See [Semantic ranking overview](semantic-search-overview.md) to learn more.
240
224
241
225
## Upload documents
242
226
243
227
Creating and loading the index are separate steps. In Azure AI Search, the index contains all searchable data and queries execute on the search service. For REST calls, the data is provided as JSON documents. Use [Documents- Index REST API](/rest/api/searchservice/documents/) for this task.
244
228
245
-
The URI is extended to include the `docs` collections and `index` operation.
229
+
The URI is extended to include the `docs` collection and `index` operation.
246
230
247
231
> [!IMPORTANT]
248
-
> The following example isn't runnable code. For readability, we excluded vector values associated with `HotelNameVector` and `DescriptionVector`. Each vector field contains 1536 embeddings, which is too long for this article. For this step, copy runnable code from the [sample on GitHub](https://github.com/Azure-Samples/azure-search-postman-samples/tree/main/quickstart-vectors).
232
+
> The following example isn't runnable code. For readability, we excluded vector values because each one contains 1536 embeddings, which is too long for this article. Copy runnable code from the [sample on GitHub](https://github.com/Azure-Samples/azure-search-postman-samples/tree/main/quickstart-vectors) if you want to try this step.
249
233
250
234
```http
251
235
### Upload documents
@@ -344,7 +328,7 @@ api-key: {{apiKey}}
344
328
{
345
329
"@search.action": "mergeOrUpload",
346
330
"HotelId": "48",
347
-
"HotelName": "Nordick's Hotel",
331
+
"HotelName": "Nordicks Hotel",
348
332
"HotelNameVector": [VECTOR ARRAY OMITTED],
349
333
"Description":
350
334
"Only 90 miles (about 2 hours) from the nation's capital and nearby
@@ -404,7 +388,7 @@ The vector queries in this section are based on two strings:
404
388
The vector query string is semantically similar to the search string, but includes terms that don't exist in the search index. If you do a keyword search for "classic lodging near running trails, eateries, retail", results are zero. We use this example to show how you can get relevant results even if there are no matching terms.
405
389
406
390
> [!IMPORTANT]
407
-
> The following examples aren't runnable code. For readability, we excluded vector values associated with `vectorQueries.vector`. A vector array includes 1536 embeddings, which is too long for this article. For this step, copy runnable code from the [sample on GitHub](https://github.com/Azure-Samples/azure-search-postman-samples/tree/main/quickstart-vectors).
391
+
> The following examples aren't runnable code. For readability, we excluded vector values because each array contains 1536 embeddings, which is too long for this article. Copy runnable code from the [sample on GitHub](https://github.com/Azure-Samples/azure-search-postman-samples/tree/main/quickstart-vectors) if you want to try these queries.
408
392
409
393
### Single vector search
410
394
@@ -800,13 +784,13 @@ Here's the last query in the collection: a hybrid query, with semantic ranking,
800
784
}
801
785
```
802
786
803
-
**Key points:**
787
+
**Key points:**
804
788
805
-
+ Vector search is specified through the vector `"vectors.value"` property. Keyword search is specified through `"search"` property.
789
+
+ Vector search is specified through the vector `"vectors.value"` property. Keyword search is specified through `"search"` property.
806
790
807
-
+ 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.
791
+
+ 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.
808
792
809
-
+ Actual results include more detail, including semantic captions and highlights. Results have been modified for readability. You should run the request in the REST client to get the full structure of the response.
793
+
+ Actual results include more detail, including semantic captions and highlights. Results have been modified for readability. You should run the request in the REST client to get the full structure of the response.
0 commit comments