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
I was trying to use AzureCognitiveSearchMemoryStore to query an existing Azure Cognitive Search resource not created through SK.
When I was trying to query it using
result = await connector.get_nearest_match_async("oaisyllabus-vector-index-new", results[0])
I got errors that the search document doesn't have the following fields
Id
Text
ExternalSourceName
Description
AdditionalMetadata
IsReference
Since my existing source doesn't have fields of the same name it was failing. On further debugging, I found these values to be hard coded in the connector code
kshitijcode
changed the title
Python Azure Cognitive Search Connector expects ACS to have few fields
Python Azure Cognitive Search Connector expects existing ACS to have few fields which are required in code
Aug 18, 2023
I was trying to use AzureCognitiveSearchMemoryStore to query an existing Azure Cognitive Search resource not created through SK.
When I was trying to query it using
result = await connector.get_nearest_match_async("oaisyllabus-vector-index-new", results[0])
I got errors that the search document doesn't have the following fields
Id
Text
ExternalSourceName
Description
AdditionalMetadata
IsReference
Since my existing source doesn't have fields of the same name it was failing. On further debugging, I found these values to be hard coded in the connector code
SEARCH_FIELD_ID = "Id"
SEARCH_FIELD_TEXT = "Text"
SEARCH_FIELD_EMBEDDING = "Embedding"
SEARCH_FIELD_SRC = "ExternalSourceName"
SEARCH_FIELD_DESC = "Description"
SEARCH_FIELD_METADATA = "AdditionalMetadata"
SEARCH_FIELD_IS_REF = "IsReference"
Is this as by design that we cannot use existing ACS fields ? If no , then should we look for a way to parameterize it?
I am happy to raise a PR to make these corrections based on the way we proceed.
The text was updated successfully, but these errors were encountered: