@@ -84,46 +84,88 @@ public static void SetJsonPropertyName(this IMutableProperty property, string? n
84
84
=> property . FindAnnotation ( CosmosAnnotationNames . PropertyName ) ? . GetConfigurationSource ( ) ;
85
85
86
86
/// <summary>
87
- /// Returns the definition of the vector stored in this property.
87
+ /// Returns the distance function of the vector stored in this property.
88
88
/// </summary>
89
89
/// <param name="property">The property.</param>
90
- /// <returns>Returns the definition of the vector stored in this property.</returns>
91
- public static CosmosVectorType ? GetVectorType ( this IReadOnlyProperty property )
92
- => ( CosmosVectorType ? ) property [ CosmosAnnotationNames . VectorType ] ;
90
+ /// <returns>Returns the distance function of the vector stored in this property.</returns>
91
+ public static DistanceFunction ? GetVectorDistanceFunction ( this IReadOnlyProperty property )
92
+ => ( DistanceFunction ? ) property [ CosmosAnnotationNames . VectorDistanceFunction ] ;
93
93
94
94
/// <summary>
95
- /// Sets the definition of the vector stored in this property.
95
+ /// Returns the dimensions of the vector stored in this property.
96
96
/// </summary>
97
97
/// <param name="property">The property.</param>
98
- /// <param name="vectorType">The type of vector stored in the property.</param >
99
- public static void SetVectorType ( this IMutableProperty property , CosmosVectorType ? vectorType )
100
- => property . SetOrRemoveAnnotation ( CosmosAnnotationNames . VectorType , vectorType ) ;
98
+ /// <returns>Returns the dimensions of the vector stored in this property.</returns >
99
+ public static int ? GetVectorDimensions ( this IReadOnlyProperty property )
100
+ => ( int ? ) property [ CosmosAnnotationNames . VectorDimensions ] ;
101
101
102
102
/// <summary>
103
- /// Sets the definition of the vector stored in this property.
103
+ /// Sets the distance function of the vector stored in this property.
104
104
/// </summary>
105
105
/// <param name="property">The property.</param>
106
- /// <param name="vectorType">The type of vector stored in the property.</param>
106
+ /// <param name="distanceFunction">The distance function of the vector stored in the property.</param>
107
+ public static void SetVectorDistanceFunction ( this IMutableProperty property , DistanceFunction ? distanceFunction )
108
+ => property . SetOrRemoveAnnotation ( CosmosAnnotationNames . VectorDistanceFunction , distanceFunction ) ;
109
+
110
+ /// <summary>
111
+ /// Sets the dimensions of the vector stored in this property.
112
+ /// </summary>
113
+ /// <param name="property">The property.</param>
114
+ /// <param name="dimensions">The dimensions of the vector stored in the property.</param>
115
+ public static void SetVectorDimensions ( this IMutableProperty property , int ? dimensions )
116
+ => property . SetOrRemoveAnnotation ( CosmosAnnotationNames . VectorDimensions , dimensions ) ;
117
+
118
+ /// <summary>
119
+ /// Sets the distance function of the vector stored in this property.
120
+ /// </summary>
121
+ /// <param name="property">The property.</param>
122
+ /// <param name="distanceFunction">The distance function of the vector stored in the property.</param>
107
123
/// <param name="fromDataAnnotation">Indicates whether the configuration was specified using a data annotation.</param>
108
124
/// <returns>The configured value.</returns>
109
- public static CosmosVectorType ? SetVectorType (
125
+ public static DistanceFunction ? SetVectorDistanceFunction (
110
126
this IConventionProperty property ,
111
- CosmosVectorType ? vectorType ,
127
+ DistanceFunction ? distanceFunction ,
112
128
bool fromDataAnnotation = false )
113
- => ( CosmosVectorType ? ) property . SetOrRemoveAnnotation (
114
- CosmosAnnotationNames . VectorType ,
115
- vectorType ,
129
+ => ( DistanceFunction ? ) property . SetOrRemoveAnnotation (
130
+ CosmosAnnotationNames . VectorDistanceFunction ,
131
+ distanceFunction ,
116
132
fromDataAnnotation ) ? . Value ;
117
133
118
134
/// <summary>
119
- /// Gets the <see cref="ConfigurationSource" /> for the definition of the vector stored in this property.
135
+ /// Sets the dimensions of the vector stored in this property.
136
+ /// </summary>
137
+ /// <param name="property">The property.</param>
138
+ /// <param name="dimensions">The dimensions of the vector stored in the property.</param>
139
+ /// <param name="fromDataAnnotation">Indicates whether the configuration was specified using a data annotation.</param>
140
+ /// <returns>The configured value.</returns>
141
+ public static int ? SetVectorDimensions (
142
+ this IConventionProperty property ,
143
+ int ? dimensions ,
144
+ bool fromDataAnnotation = false )
145
+ => ( int ? ) property . SetOrRemoveAnnotation (
146
+ CosmosAnnotationNames . VectorDimensions ,
147
+ dimensions ,
148
+ fromDataAnnotation ) ? . Value ;
149
+
150
+ /// <summary>
151
+ /// Gets the <see cref="ConfigurationSource" /> for the distance function of the vector stored in this property.
152
+ /// </summary>
153
+ /// <param name="property">The property.</param>
154
+ /// <returns>
155
+ /// The <see cref="ConfigurationSource" /> for the distance function of the vector stored in this property.
156
+ /// </returns>
157
+ public static ConfigurationSource ? GetVectorDistanceFunctionConfigurationSource ( this IConventionProperty property )
158
+ => property . FindAnnotation ( CosmosAnnotationNames . VectorDistanceFunction ) ? . GetConfigurationSource ( ) ;
159
+
160
+ /// <summary>
161
+ /// Gets the <see cref="ConfigurationSource" /> for the dimensions of the vector stored in this property.
120
162
/// </summary>
121
163
/// <param name="property">The property.</param>
122
164
/// <returns>
123
- /// The <see cref="ConfigurationSource" /> for the definition of the vector stored in this property.
165
+ /// The <see cref="ConfigurationSource" /> for the dimensions of the vector stored in this property.
124
166
/// </returns>
125
- public static ConfigurationSource ? GetVectorTypeConfigurationSource ( this IConventionProperty property )
126
- => property . FindAnnotation ( CosmosAnnotationNames . VectorType ) ? . GetConfigurationSource ( ) ;
167
+ public static ConfigurationSource ? GetVectorDimensionsConfigurationSource ( this IConventionProperty property )
168
+ => property . FindAnnotation ( CosmosAnnotationNames . VectorDimensions ) ? . GetConfigurationSource ( ) ;
127
169
128
170
/// <summary>
129
171
/// Returns the value indicating whether full-text search is enabled for this property.
0 commit comments