fix(python): add missing FTS type annotations to stubs and wrappers (#497)
- Add FtsIndexParam/FtsQueryParam class stubs to model/param/__init__.pyi - Add Fts/FtsIndexParam/FtsQueryParam to zvec/__init__.pyi exports - Extend Query.param type to include FtsQueryParam - Update Query._validate to allow fts + FtsQueryParam combination - Extend FieldSchema.index_param type to support FtsIndexParam - Extend Collection.create_index type to support FtsIndexParam
This commit is contained in:
@@ -171,6 +171,11 @@ Result<FtsCondInfo::Ptr> SQLEngineImpl::parse_fts_query(
|
||||
}
|
||||
|
||||
auto *fts_query_param = dynamic_cast<FtsQueryParams *>(query_params.get());
|
||||
if (query_params && !fts_query_param) {
|
||||
return tl::make_unexpected(Status::InvalidArgument(
|
||||
"FTS query only accepts FtsQueryParam, got incompatible query param "
|
||||
"type"));
|
||||
}
|
||||
|
||||
// Determine default operator once, shared by both query_string and
|
||||
// match_string paths. Accept "and"/"or" case-insensitively, empty means OR;
|
||||
|
||||
Reference in New Issue
Block a user