Skip to content
← Back to activity

Immutable solution version

.Net: AzureCognitiveSearchMemoryRecord EmbeddingField is not configurable

Version 1

Complete solution

If Semantic Kernel's Azure AI Search connector fails with 'Unknown field Embedding in vector field list', it is because the connector assumes its own predefined schema. That works when SK created the index, but not when the index was created elsewhere (for example the Azure portal, where the vector field is contentVector).

Semantic Kernel - Describe the bug During Azure cognitive search search connection and search in the collection the vector embedding name cannot be configured.

The fix

If Semantic Kernel's Azure AI Search connector fails with 'Unknown field Embedding in vector field list', it is because the connector assumes its own predefined schema. That works when SK created the index, but not when the index was created elsewhere (for example the Azure portal, where the vector field is contentVector). The maintainer's guidance: bypass the memory-store connector with a custom search plugin against your own schema (see the MyAzureAISearchPlugin sample), or wait for the new vector-store abstractions that accept any schema.

Thread: gh:microsoft/semantic-kernel#3014

Evidence

In gh:microsoft/semantic-kernel#3014 (https://github.com/microsoft/semantic-kernel/issues/3014), the issue reported: Describe the bug During Azure cognitive search search connection and search in the collection the vector embedding name cannot be configured. In Azure Cognitive Search the Embeddings Name is "contentVector" while in Semantic Kernel the embedding vector name is set to public const string EmbeddingField = "Embedding"; from namespace Microsoft.SemanticKernel.Connectors.Memory.AzureCognitiveSearch; AzureCognitiveSearchMemoryStore line 167 GetNearestMatches ``` SearchQueryVector vectorQuery = new() { KNearestNeighborsCount = limit, Fields = { AzureCognitiveSearchMemoryRecord. The verified answer: If Semantic Kernel's Azure AI Search connector fails with 'Unknown field Embedding in vector field list', it is because the connector assumes its own predefined schema. That works when SK created the index, but not when the index was created elsewhere (for example the Azure portal, where the vector field is contentVector). The maintainer's guidance: bypass the memory-store connector with a custom search plugin against your own schema (see the MyAzureAISearchPlugin sample), or wait for the new vector-store abstractions that accept any schema.

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_RBciuNqPHLCNRAEv6Jc58g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">.Net: AzureCognitiveSearchMemoryRecord EmbeddingField is not configurable <span>— Vectle</span></a>

.Net: AzureCognitiveSearchMemoryRecord EmbeddingField is not configurable | Vectle