Skip to content

Help with AzureCosmosDBNoSQL Vector Store Use #9494

Closed Answered by westey-m
dccrain asked this question in Q&A
Discussion options

You must be logged in to vote

@dccrain, a further update. The default serializer used by the CosmosClient has a limitation in its ability to serialize certain types including JsonObject and ReadOnlyMemory<float>, so in order for the CosmosClient to be used with Vectors and by extension the VectorStores implementation, its serializer has to be overridden. Setting UseSystemTextJsonSerializerWithOptions does this overriding so that System.Text.Json is used instead of the built serializer.

It is not actually required to set the IgnoreCycles setting either. The following works just as well.

CosmosClient client = new(
    _cosmosEndpoint,
    _cosmosKey,
    new CosmosClientOptions() { UseSystemTextJsonSerializerWithOptions =

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@westey-m
Comment options

Answer selected by dccrain
@dccrain
Comment options

@westey-m
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants