Skip to content

Commit 47adfe1

Browse files
authored
Fix DRIFT search on Azure AI Search (#1645)
* Add vector field to retrievable fields for Azure AI Search * Add DRIFT and Basic search to smoke tests * Semver * Format * Remove DRIFT smoke test for now (brittle)
1 parent dd884c0 commit 47adfe1

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "patch",
3+
"description": "Fix DRIFT search on Azure AI Search."
4+
}

graphrag/vector_stores/azure_ai_search.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def load_documents(
111111
name="vector",
112112
type=SearchFieldDataType.Collection(SearchFieldDataType.Single),
113113
searchable=True,
114+
hidden=False, # DRIFT needs to return the vector for client-side similarity
114115
vector_search_dimensions=self.vector_size,
115116
vector_search_profile_name=self.vector_search_profile_name,
116117
),

tests/fixtures/min-csv/config.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@
134134
{
135135
"query": "What is the major conflict in this story and who are the protagonist and antagonist?",
136136
"method": "global"
137+
},
138+
{
139+
"query": "Who is Jordan Hayes?",
140+
"method": "basic"
137141
}
138142
],
139143
"slow": false

tests/fixtures/text/config.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@
152152
{
153153
"query": "What is the major conflict in this story and who are the protagonist and antagonist?",
154154
"method": "global"
155+
},
156+
{
157+
"query": "Who is Jordan Hayes?",
158+
"method": "basic"
155159
}
156160
],
157161
"slow": false

0 commit comments

Comments
 (0)