File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
tests/unit_tests/fixtures Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1109,6 +1109,11 @@ def _handle_field_filter(
11091109 f"Unsupported type: { type (val )} for value: { val } "
11101110 )
11111111
1112+ if isinstance (val , bool ): # b/c bool is an instance of int
1113+ raise NotImplementedError (
1114+ f"Unsupported type: { type (val )} for value: { val } "
1115+ )
1116+
11121117 queried_field = self .EmbeddingStore .cmetadata [field ].astext
11131118
11141119 if operator in {"$in" }:
Original file line number Diff line number Diff line change 203203 {"name" : {"$in" : ["adam" , "bob" ]}},
204204 [1 , 2 ],
205205 ),
206+ # With numeric fields
207+ (
208+ {"id" : {"$in" : [1 , 2 ]}},
209+ [1 , 2 ],
210+ ),
206211 # Test nin
207212 (
208213 {"name" : {"$nin" : ["adam" , "bob" ]}},
209214 [3 ],
210215 ),
216+ ## with numeric fields
217+ (
218+ {"id" : {"$nin" : [1 , 2 ]}},
219+ [3 ],
220+ ),
211221]
212222
213223TYPE_5_FILTERING_TEST_CASES = [
You can’t perform that action at this time.
0 commit comments