提交 16ff16b2 编写于 作者: F FluorineDog 提交者: yefu.chen

Renaming and add load index api beta

Signed-off-by: NFluorineDog <guilin.gou@zilliz.com>
上级 f02bd8c8
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <string> #include <string>
#include <map> #include <map>
#include "../index/knowhere/knowhere/index/vector_index/VecIndex.h" #include "knowhere/index/vector_index/VecIndex.h"
struct LoadIndexInfo { struct LoadIndexInfo {
std::string field_name; std::string field_name;
...@@ -21,3 +21,9 @@ struct LoadIndexInfo { ...@@ -21,3 +21,9 @@ struct LoadIndexInfo {
std::map<std::string, std::string> index_params; std::map<std::string, std::string> index_params;
milvus::knowhere::VecIndexPtr index; milvus::knowhere::VecIndexPtr index;
}; };
struct LoadFieldDataInfo {
int64_t field_id;
void* blob;
int64_t row_count;
};
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include "query/deprecated/GeneralQuery.h" #include "query/deprecated/GeneralQuery.h"
#include "query/Plan.h" #include "query/Plan.h"
#include "common/LoadIndex.h" #include "common/LoadInfo.h"
#include "segcore/SegmentInterface.h" #include "segcore/SegmentInterface.h"
namespace milvus { namespace milvus {
......
...@@ -10,17 +10,20 @@ ...@@ -10,17 +10,20 @@
// or implied. See the License for the specific language governing permissions and limitations under the License // or implied. See the License for the specific language governing permissions and limitations under the License
#include "SegmentInterface.h" #include "SegmentInterface.h"
#include "common/LoadInfo.h"
// class SegmentSealed : public SegmentInternalInterface { namespace milvus::segcore {
// public:
// const Schema& get_schema() = 0; class SegmentSealed {
// int64_t get_num_chunk() = 0; public:
// virtual const Schema&
// explicit SegmentSealed(SchemaPtr schema); get_schema() = 0;
// void set_size(); virtual int64_t
// void load_data(FieldId field_id, void* blob, int64_t blob_size); get_row_count() = 0;
// virtual void
// LoadIndex(const LoadIndexInfo& info) = 0;
// private: virtual void
// SchemaPtr schema_; LoadFieldData(const LoadFieldDataInfo& info) = 0;
// } };
} // namespace milvus::segcore
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include "index/knowhere/knowhere/common/BinarySet.h" #include "index/knowhere/knowhere/common/BinarySet.h"
#include "index/knowhere/knowhere/index/vector_index/VecIndexFactory.h" #include "index/knowhere/knowhere/index/vector_index/VecIndexFactory.h"
#include "segcore/load_index_c.h" #include "segcore/load_index_c.h"
#include "common/LoadIndex.h" #include "common/LoadInfo.h"
#include "utils/EasyAssert.h" #include "utils/EasyAssert.h"
CStatus CStatus
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include <knowhere/index/vector_index/VecIndexFactory.h> #include <knowhere/index/vector_index/VecIndexFactory.h>
#include <cstdint> #include <cstdint>
#include <boost/concept_check.hpp> #include <boost/concept_check.hpp>
#include "common/LoadIndex.h" #include "common/LoadInfo.h"
CSegmentBase CSegmentBase
NewSegment(CCollection collection, uint64_t segment_id) { NewSegment(CCollection collection, uint64_t segment_id) {
......
...@@ -18,6 +18,7 @@ set(MILVUS_TEST_FILES ...@@ -18,6 +18,7 @@ set(MILVUS_TEST_FILES
test_reduce.cpp test_reduce.cpp
test_interface.cpp test_interface.cpp
test_span.cpp test_span.cpp
test_load.cpp
) )
add_executable(all_tests add_executable(all_tests
${MILVUS_TEST_FILES} ${MILVUS_TEST_FILES}
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <index/knowhere/knowhere/index/vector_index/adapter/VectorAdapter.h> #include <index/knowhere/knowhere/index/vector_index/adapter/VectorAdapter.h>
#include <index/knowhere/knowhere/index/vector_index/VecIndexFactory.h> #include <index/knowhere/knowhere/index/vector_index/VecIndexFactory.h>
#include <index/knowhere/knowhere/index/vector_index/IndexIVFPQ.h> #include <index/knowhere/knowhere/index/vector_index/IndexIVFPQ.h>
#include <common/LoadIndex.h> #include <common/LoadInfo.h>
#include <utils/Types.h> #include <utils/Types.h>
#include <segcore/Collection.h> #include <segcore/Collection.h>
#include "test_utils/DataGen.h" #include "test_utils/DataGen.h"
......
#include <gtest/gtest.h>
#include "segcore/SegmentSealed.h"
TEST(Load, Naive) {
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册