Skip to content

Commit 1fbe99b

Browse files
authored
Merge pull request #267279 from HeidiSteen/heidist-langchain
[azure search] vector store updates
2 parents 03459ec + 44a779c commit 1fbe99b

File tree

3 files changed

+31
-11
lines changed

3 files changed

+31
-11
lines changed
13 KB
Loading

articles/search/search-howto-run-reset-indexers.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.service: cognitive-search
99
ms.custom:
1010
- ignite-2023
1111
ms.topic: how-to
12-
ms.date: 12/18/2023
12+
ms.date: 02/26/2024
1313
---
1414

1515
# Run or reset indexers, skills, or documents
@@ -24,7 +24,15 @@ This article explains how to run indexers on demand, with and without a reset. I
2424

2525
## Indexer execution
2626

27-
You can run multiple indexers at one time assuming you sufficient replicas (one indexer job per replica), but each indexer itself is single-instance. Starting a new instance while the indexer is already in execution produces this error: `"Failed to run indexer "<indexer name>" error: "Another indexer invocation is currently in progress; concurrent invocations are not allowed."`
27+
A search service runs one indexer job per [search unit](search-capacity-planning.md#concepts-search-units-replicas-partitions-shards). Every search service starts with one search unit, but each new partition or replica increases the search units of your service. You can check the search unit count in the portal's Essential section of the **Overview** page. If you need concurrent processing, make sure you have sufficient replicas. Indexers don't run in the background, so you might detect more query throttling than usual if the service is under pressure.
28+
29+
The following screenshot shows the number of search units, which determines how many indexers can run at once.
30+
31+
:::image type="content" source="media/search-howto-run-reset-indexers/search-units.png" alt-text="Screenshot of the essentials section of the overview page, showing search units.":::
32+
33+
Once indexer execution starts, you can't pause or stop it. Indexer execution stops when there are no more documents to load or refresh, or when the [maximum running time limit](search-limits-quotas-capacity.md#indexer-limits) is reached.
34+
35+
You can run multiple indexers at one time assuming sufficient capacity, but each indexer itself is single-instance. Starting a new instance while the indexer is already in execution produces this error: `"Failed to run indexer "<indexer name>" error: "Another indexer invocation is currently in progress; concurrent invocations are not allowed."`
2836

2937
An indexer job runs in a managed execution environment. Currently, there are two environments. You can't control or configure which environment is used. Azure AI Search determines the environment based on job composition and the ability of the service to move an indexer job onto a content processor (some [security features](search-indexer-securing-resources.md#indexer-execution-environment) block the multitenant environment).
3038

articles/search/vector-store.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ Considerations for vector storage include the following points:
2929

3030
In Azure AI Search, there are two patterns for working with search results.
3131

32-
+ Generative search. Language models formulate a response to the user's query using data from Azure AI Search. This pattern usually includes an orchestration layer to coordinate prompts and maintain context. In this pattern, results are fed into prompt flows, received by chat models like GPT and Text-Davinci. This approach is based on [**Retrieval augmented generation (RAG)**](retrieval-augmented-generation-overview.md) architecture, where the search index provides the grounding data.
32+
+ Generative search. Language models formulate a response to the user's query using data from Azure AI Search. This pattern includes an orchestration layer to coordinate prompts and maintain context. In this pattern, search results are fed into prompt flows, received by chat models like GPT and Text-Davinci. This approach is based on [**Retrieval augmented generation (RAG)**](retrieval-augmented-generation-overview.md) architecture, where the search index provides the grounding data.
3333

34-
+ Classic search. Search engine formulates a response based on content in your index, and you render those results in a client app. In a direct response from the search engine, results are returned in a flattened row set, and you can choose which fields are passed to the client app. It's expected that you would populate the vector store (search index) with nonvector content that's human readable in your response. The search engine matches on vectors, but can return nonvector values from the same search document. [**Vector queries**](vector-search-how-to-query.md) and [**hybrid queries**](hybrid-search-how-to-query.md) cover the types of requests.
34+
+ Classic search using a search bar, query input string, and rendered results. The search engine accepts and executes the vector query, formulates a response, and you render those results in a client app. In Azure AI Search, results are returned in a flattened row set, and you can choose which fields to include search results. Since there's no chat model, it's expected that you would populate the vector store (search index) with nonvector content that's human readable in your response. Although the search engine matches on vectors, you should use nonvector values to populate the search results. [**Vector queries**](vector-search-how-to-query.md) and [**hybrid queries**](hybrid-search-how-to-query.md) cover the types of query requests you can formulate for classic search scenarios.
3535

3636
Your index schema should reflect your primary use case. The following section highlights the differences in field composition for solutions built for generative AI or classic search.
3737

@@ -41,7 +41,7 @@ An index schema for a vector store requires a name, a key field (string), one or
4141

4242
### Basic vector field configuration
4343

44-
A vector field, such as `"content_vector"` in the following example, is of type `Collection(Edm.Single)`. It must be searchable and retrievable. It can't be filterable, facetable, or sortable, and it can't have analyzers, normalizers, or synonym map assignments. It must have dimensions set to the number of embeddings generated by the embedding model. For instance, if you're using text-embedding-ada-002, it generates 1,536 embeddings. A vector search profile is specified in a separate [vector search configuration](vector-search-how-to-create-index.md) and assigned to a vector field using a profile name.
44+
Vector fields are distinguished by their data type and vector-specific properties. Here's what a vector field looks like in a fields collection:
4545

4646
```json
4747
{
@@ -54,11 +54,17 @@ A vector field, such as `"content_vector"` in the following example, is of type
5454
}
5555
```
5656

57-
### Fields collection for basic vector workloads
57+
Vector fields are of type `Collection(Edm.Single)`.
58+
59+
Vector fields must be searchable and retrievable, but they can't be filterable, facetable, or sortable, or have analyzers, normalizers, or synonym map assignments.
60+
61+
Vector fields must have `dimensions` set to the number of embeddings generated by the embedding model. For example, text-embedding-ada-002 generates 1,536 embeddings for each chunk of text.
62+
63+
Vector fields are indexed using algorithms indicated by a *vector search profile*, which is defined elsewhere in the index and thus not shown in the example. For more information, see [vector search configuration](vector-search-how-to-create-index.md).
5864

59-
Here's an example showing a vector field in context, with other fields in a collection.
65+
### Fields collection for basic vector workloads
6066

61-
The key field (required) is `"id"` in this example. The `"content"` field is the human readable equivalent of the `"content_vector"` field. Although if you're using language models exclusively for response formulation, you can skip nonvector content fields. Metadata fields are useful for filters, especially if metadata includes origin information about the source document. You can't filter on a vector field directly, but you can set prefilter or postfilter modes to filter before or after vector query execution.
67+
Vector stores require more fields besides vector fields. For example, a key field (`"id"` in this example) is an index requirement.
6268

6369
```json
6470
"name": "example-basic-vector-idx",
@@ -70,6 +76,10 @@ The key field (required) is `"id"` in this example. The `"content"` field is the
7076
]
7177
```
7278

79+
Other fields, such as the `"content"` field, provide the human readable equivalent of the `"content_vector"` field. If you're using language models exclusively for response formulation, you can omit nonvector content fields, but solutions that push search results directly to client apps should have nonvector content.
80+
81+
Metadata fields are useful for filters, especially if metadata includes origin information about the source document. You can't filter on a vector field directly, but you can set prefilter or postfilter modes to filter before or after vector query execution.
82+
7383
### Schema generated by the Import and vectorize data wizard
7484

7585
We recommend the [Import and vectorize data wizard](search-get-started-portal-import-vectors.md) for evaluation and proof-of-concept testing. The wizard generates the example schema in this section.
@@ -182,11 +192,13 @@ All vector indexing and query requests target an index. Endpoints are usually on
182192
| `<your-service>.search.windows.net/indexes` | Targets the indexes collection. Used when creating, listing, or deleting an index. Admin rights are required for these operations, available through admin [API keys](search-security-api-keys.md) or a [Search Contributor role](search-security-rbac.md#built-in-roles-used-in-search). |
183193
| `<your-service>.search.windows.net/indexes/<your-index>/docs` | Targets the documents collection of a single index. Used when querying an index or data refresh. For queries, read rights are sufficient, and available through query API keys or a data reader role. For data refresh, admin rights are required. |
184194

185-
#### How to connect to Azure AI Search
195+
### How to connect to Azure AI Search
196+
197+
1. [Make sure you have permissions](search-security-rbac.md) or an [API access key](search-security-api-keys.md). Unless you're querying an existing index, you need admin rights or a contributor role assignment to manage and view content on a search service.
186198

187-
1. [Start with the Azure portal](https://portal.azure.com). Azure subscribers, or the person who created the search service, can manage the search service in the Azure portal. An Azure subscription requires Contributor or above permissions to create or delete services. This permission level is sufficient for fully managing a search service in the Azure portal.
199+
1. [Start with the Azure portal](https://portal.azure.com). The person who created the search service can view and manage the search service, including granting access to others through the **Access control (IAM)** page.
188200

189-
1. Try other clients for programmatic access. We recommend the quickstarts and samples for first steps:
201+
1. Move on to other clients for programmatic access. We recommend the quickstarts and samples for first steps:
190202

191203
+ [Quickstart: REST](search-get-started-vector.md)
192204
+ [Vector samples](https://github.com/Azure/azure-search-vector-samples/blob/main/README.md)

0 commit comments

Comments
 (0)