11using System . Buffers ;
2- using System . Data ;
3- using System . Numerics ;
42using System . Reflection ;
53using System . Runtime . CompilerServices ;
64using System . Runtime . InteropServices ;
@@ -49,7 +47,7 @@ private async Task<Api> CreateIndexAsync(string endpointId, [CallerMemberName] s
4947
5048 var ftCreateParams = FTCreateParams . CreateParams ( ) ;
5149 Assert . True ( await ft . CreateAsync ( index , ftCreateParams , sc ) ) ;
52-
50+
5351 if ( populate )
5452 {
5553#if NET
@@ -77,7 +75,7 @@ private async Task<Api> CreateIndexAsync(string endpointId, [CallerMemberName] s
7775
7876 await last ;
7977#else
80- throw new PlatformNotSupportedException ( "FP16" ) ;
78+ throw new SkipException ( "FP16 not supported " ) ;
8179#endif
8280 }
8381
@@ -138,13 +136,9 @@ public enum Scenario
138136 {
139137 Simple ,
140138 NoSort ,
141- ExplainScore ,
142139 Apply ,
143140 LinearNoScore ,
144- LinearWithScore ,
145141 RrfNoScore ,
146- RrfWithScore ,
147- PostFilterByTag ,
148142 PostFilterByNumber ,
149143 LimitFirstPage ,
150144 LimitSecondPage ,
@@ -159,36 +153,41 @@ public enum Scenario
159153 GroupByNoReduce ,
160154 SearchWithAlias ,
161155 SearchWithSimpleScorer ,
162- SearchWithComplexScorer ,
163156 VectorWithAlias ,
164157 VectorWithRange ,
165- VectorWithRangeAndDistanceAlias ,
166- VectorWithRangeAndEpsilon ,
167158 VectorWithTagFilter ,
168159 VectorWithNumericFilter ,
169160 VectorWithNearest ,
170161 VectorWithNearestCount ,
171- VectorWithNearestDistAlias ,
172- VectorWithNearestMaxCandidates ,
173162 PreFilterByTag ,
174163 PreFilterByNumeric ,
175- ParamPostFilter ,
176164 ParamSearch ,
177165 ParamVsim ,
178- ParamMultiPostFilter ,
179166 ParamPreFilter ,
180- ParamMultiPreFilter
167+ ParamMultiPreFilter ,
168+
169+ [ NotYetImplemented ] ExplainScore ,
170+ [ NotYetImplemented ] LinearWithScore ,
171+ [ NotYetImplemented ] RrfWithScore ,
172+ [ NotYetImplemented ] PostFilterByTag ,
173+ [ NotYetImplemented ] SearchWithComplexScorer ,
174+ [ NotYetImplemented ] VectorWithRangeAndDistanceAlias ,
175+ [ NotYetImplemented ] VectorWithRangeAndEpsilon ,
176+ [ NotYetImplemented ] VectorWithNearestDistAlias ,
177+ [ NotYetImplemented ] VectorWithNearestMaxCandidates ,
178+ [ NotYetImplemented ] ParamPostFilter ,
179+ [ NotYetImplemented ] ParamMultiPostFilter ,
181180 }
182181
183- private sealed class BrokenAttribute : Attribute
182+ private sealed class NotYetImplementedAttribute : Attribute
184183 {
185184 }
186185
187186 private static class EnumCache < T >
188187 {
189188 public static IEnumerable < T > Values { get ; } = (
190189 from field in typeof ( T ) . GetFields ( BindingFlags . Public | BindingFlags . Static )
191- where ! Attribute . IsDefined ( field , typeof ( BrokenAttribute ) )
190+ where ! Attribute . IsDefined ( field , typeof ( NotYetImplementedAttribute ) )
192191 let val = field . GetRawConstantValue ( )
193192 where val is not null
194193 select ( T ) val ) . ToArray ( ) ;
@@ -236,17 +235,17 @@ public async Task TestSearchScenarios(string endpointId, Scenario scenario)
236235 Scenario . VectorWithRange => query . VectorSearch ( new ( "@vector1" , VectorData . Raw ( vec ) ,
237236 method : VectorSearchMethod . Range ( 42 ) ) ) ,
238237 Scenario . VectorWithRangeAndDistanceAlias => query . VectorSearch ( new ( "@vector1" , VectorData . Raw ( vec ) ,
239- method : VectorSearchMethod . Range ( 42 , distanceAlias : "dist_alias" ) ) ) ,
238+ method : VectorSearchMethod . Range ( 42 , null , distanceAlias : "dist_alias" ) ) ) ,
240239 Scenario . VectorWithRangeAndEpsilon => query . VectorSearch ( new ( "@vector1" , VectorData . Raw ( vec ) ,
241240 method : VectorSearchMethod . Range ( 42 , epsilon : 0.1 ) ) ) ,
242241 Scenario . VectorWithNearest => query . VectorSearch ( new ( "@vector1" , VectorData . Raw ( vec ) ,
243242 method : VectorSearchMethod . NearestNeighbour ( ) ) ) ,
244243 Scenario . VectorWithNearestCount => query . VectorSearch ( new ( "@vector1" , VectorData . Raw ( vec ) ,
245244 method : VectorSearchMethod . NearestNeighbour ( 20 ) ) ) ,
246245 Scenario . VectorWithNearestDistAlias => query . VectorSearch ( new ( "@vector1" , VectorData . Raw ( vec ) ,
247- method : VectorSearchMethod . NearestNeighbour ( distanceAlias : "dist_alias" ) ) ) ,
246+ method : VectorSearchMethod . NearestNeighbour ( null , null , distanceAlias : "dist_alias" ) ) ) ,
248247 Scenario . VectorWithNearestMaxCandidates => query . VectorSearch ( new ( "@vector1" , VectorData . Raw ( vec ) ,
249- method : VectorSearchMethod . NearestNeighbour ( maxTopCandidates : 10 ) ) ) ,
248+ method : VectorSearchMethod . NearestNeighbour ( null , maxTopCandidates : 10 ) ) ) ,
250249 Scenario . VectorWithTagFilter => query . VectorSearch ( new ( "@vector1" , VectorData . Raw ( vec ) ,
251250 filter : "@tag1:{foo}" ) ) ,
252251 Scenario . VectorWithNumericFilter => query . VectorSearch ( new ( "@vector1" , VectorData . Raw ( vec ) ,
0 commit comments