提交 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 @@
#include <string>
#include <map>
#include "../index/knowhere/knowhere/index/vector_index/VecIndex.h"
#include "knowhere/index/vector_index/VecIndex.h"
struct LoadIndexInfo {
std::string field_name;
......@@ -21,3 +21,9 @@ struct LoadIndexInfo {
std::map<std::string, std::string> index_params;
milvus::knowhere::VecIndexPtr index;
};
struct LoadFieldDataInfo {
int64_t field_id;
void* blob;
int64_t row_count;
};
......@@ -18,7 +18,7 @@
#include "query/deprecated/GeneralQuery.h"
#include "query/Plan.h"
#include "common/LoadIndex.h"
#include "common/LoadInfo.h"
#include "segcore/SegmentInterface.h"
namespace milvus {
......
......@@ -10,17 +10,20 @@
// or implied. See the License for the specific language governing permissions and limitations under the License
#include "SegmentInterface.h"
#include "common/LoadInfo.h"
// class SegmentSealed : public SegmentInternalInterface {
// public:
// const Schema& get_schema() = 0;
// int64_t get_num_chunk() = 0;
//
// explicit SegmentSealed(SchemaPtr schema);
// void set_size();
// void load_data(FieldId field_id, void* blob, int64_t blob_size);
//
//
// private:
// SchemaPtr schema_;
// }
namespace milvus::segcore {
class SegmentSealed {
public:
virtual const Schema&
get_schema() = 0;
virtual int64_t
get_row_count() = 0;
virtual void
LoadIndex(const LoadIndexInfo& info) = 0;
virtual void
LoadFieldData(const LoadFieldDataInfo& info) = 0;
};
} // namespace milvus::segcore
......@@ -12,7 +12,7 @@
#include "index/knowhere/knowhere/common/BinarySet.h"
#include "index/knowhere/knowhere/index/vector_index/VecIndexFactory.h"
#include "segcore/load_index_c.h"
#include "common/LoadIndex.h"
#include "common/LoadInfo.h"
#include "utils/EasyAssert.h"
CStatus
......
......@@ -19,7 +19,7 @@
#include <knowhere/index/vector_index/VecIndexFactory.h>
#include <cstdint>
#include <boost/concept_check.hpp>
#include "common/LoadIndex.h"
#include "common/LoadInfo.h"
CSegmentBase
NewSegment(CCollection collection, uint64_t segment_id) {
......
......@@ -18,6 +18,7 @@ set(MILVUS_TEST_FILES
test_reduce.cpp
test_interface.cpp
test_span.cpp
test_load.cpp
)
add_executable(all_tests
${MILVUS_TEST_FILES}
......
......@@ -23,7 +23,7 @@
#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/IndexIVFPQ.h>
#include <common/LoadIndex.h>
#include <common/LoadInfo.h>
#include <utils/Types.h>
#include <segcore/Collection.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.
先完成此消息的编辑!
想要评论请 注册