Skip to content

Commit 793837c

Browse files
authored
Added search profile to fix index creation error (#8136)
1 parent 32b35e4 commit 793837c

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

tools/sdk-ai-bots/Embeddings/embedding/embedding.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self):
3939
type=SearchFieldDataType.Collection(SearchFieldDataType.Single),
4040
searchable=True,
4141
vector_search_dimensions=len(embedding_function("Text")),
42-
vector_search_configuration="default"
42+
vector_search_profile_name="myHnswProfile"
4343
),
4444
SearchField(
4545
name="Text",
@@ -79,8 +79,13 @@ def __init__(self):
7979
"metric": "cosine",
8080
}
8181
)
82+
search_profile = {
83+
"name": "myHnswProfile",
84+
"algorithm_configuration_name": "searchAlgorithm",
85+
}
8286
vector_search: VectorSearch = VectorSearch(
83-
algorithms=[algorithm_configuration]
87+
algorithms=[algorithm_configuration],
88+
profiles=[search_profile]
8489
)
8590
azure_search: AzureSearch = AzureSearch(
8691
azure_search_endpoint=AZURE_SEARCH_ENDPOINT,

0 commit comments

Comments
 (0)