PutIfAbsentAsync Method
PutIfAbsentAsync(TKey, IVectorDocument<TValue>)
Puts the specified vector document into the collection with the specified key if the key is not already associated with a vector document.
Declaration
Task<IVectorDocument<TValue>> PutIfAbsentAsync(TKey key, IVectorDocument<TValue> IVectorDocument)
Parameters
| TKey | key | The key of the vector document to put if absent. |
| IVectorDocument<TValue> | IVectorDocument | The vector document to put into the collection if the key is not already associated with a vector document. |
Returns
| Task<IVectorDocument<TValue>> | A task that represents the asynchronous operation. The task result contains the previous vector document associated with the specified key, or null if there was no mapping for the key. |