in src/WebJobs.Extensions.OpenAI.CosmosDBSearch/CosmosDBSearchProvider.cs [399:438]
BsonDocument GetIndexDefinitionVectorIVF()
{
return new BsonDocument
{
{ "createIndexes", this.collectionName },
{
"indexes",
new BsonArray
{
new BsonDocument
{
{ "name", this.indexName },
{
"key",
new BsonDocument
{
{
this.cosmosDBSearchConfigOptions.Value.EmbeddingKey,
"cosmosSearch"
}
}
},
{
"cosmosSearchOptions",
new BsonDocument
{
{ "kind", this.cosmosDBSearchConfigOptions.Value.Kind },
{ "numLists", this.cosmosDBSearchConfigOptions.Value.NumLists },
{ "similarity", this.cosmosDBSearchConfigOptions.Value.Similarity },
{
"dimensions",
this.cosmosDBSearchConfigOptions.Value.VectorSearchDimensions
}
}
}
}
}
}
};
}