feat: fetch() add output_fields param (#358)
This commit is contained in:
@@ -271,16 +271,21 @@ void ZVecPyCollection::bind_dql_methods(
|
||||
// return GroupResults
|
||||
return unwrap_expected(result);
|
||||
})
|
||||
.def("Fetch",
|
||||
[](const Collection &self, const std::vector<std::string> &pks) {
|
||||
Result<DocPtrMap> result;
|
||||
{
|
||||
py::gil_scoped_release release;
|
||||
result = self.Fetch(pks);
|
||||
}
|
||||
// return DocPtrMap
|
||||
return unwrap_expected(result);
|
||||
})
|
||||
.def(
|
||||
"Fetch",
|
||||
[](const Collection &self, const std::vector<std::string> &pks,
|
||||
const std::optional<std::vector<std::string>> &output_fields,
|
||||
bool include_vector) {
|
||||
Result<DocPtrMap> result;
|
||||
{
|
||||
py::gil_scoped_release release;
|
||||
result = self.Fetch(pks, output_fields, include_vector);
|
||||
}
|
||||
// return DocPtrMap
|
||||
return unwrap_expected(result);
|
||||
},
|
||||
py::arg("pks"), py::arg("output_fields") = py::none(),
|
||||
py::arg("include_vector") = true)
|
||||
.def(
|
||||
"_debug_hnsw_storage_mode",
|
||||
[](const Collection &self, const std::string &column_name) {
|
||||
|
||||
Reference in New Issue
Block a user