-
Type: Task
-
Resolution: Gone away
-
Priority: Unknown
-
None
-
Affects Version/s: 2.22.0
-
Component/s: Builders
-
None
Hi,
I would like to perform a vector cosine similarity in mongo DB. For that as a first step I need to create an index similar to below
{{{}}
"createIndexes": "<collection_name>",
"indexes": [
{
"name": "<index_name>",
"key": {
"<path_to_property>": "cosmosSearch"
},
"cosmosSearchOptions": {
"kind": "vector-ivf",
"numLists": <integer_value>,
"nProbes": <integer_value>,
"similarity": "<string_value>",
"dimensions": <integer_value>
{{ }}}
I want to do the same via MongoDB C# drivers. This is because I create the collection dynamically via code. I tried using the CreateIndexModelOptions. This class does not seem to have the properties required to create the above index. How do I go about doing this ?
{{ }}}
]
}