Add other API mehtods
This commit is contained in:
parent
510f2909ae
commit
3d40976756
@ -34,8 +34,11 @@ class ExternalStoreMock {
|
|||||||
public:
|
public:
|
||||||
enum class Consistency : uint8_t { DEFAULT };
|
enum class Consistency : uint8_t { DEFAULT };
|
||||||
|
|
||||||
void CreateAllPropsIndex(std::string name, std::string tokenizer = "DUMMY_TOKENIZER",
|
void CreateAllPropsIndex(std::string index_name, LabelId label, std::string tokenizer = "DUMMY_TOKENIZER",
|
||||||
Consistency consistency = Consistency::DEFAULT) {}
|
Consistency consistency = Consistency::DEFAULT);
|
||||||
|
|
||||||
|
void CreateIndex(std::string index_name, LabelId label, std::vector<PropertyId> properties,
|
||||||
|
std::string tokenizer = "DUMMY_TOKENIZER", Consistency consistency = Consistency::DEFAULT);
|
||||||
|
|
||||||
void DropIndex(std::string index_name) { storage.erase(index_name); }
|
void DropIndex(std::string index_name) { storage.erase(index_name); }
|
||||||
|
|
||||||
@ -45,6 +48,8 @@ class ExternalStoreMock {
|
|||||||
|
|
||||||
void DeleteDocument(std::uint64_t id) { storage[INDEX].erase(id); }
|
void DeleteDocument(std::uint64_t id) { storage[INDEX].erase(id); }
|
||||||
|
|
||||||
|
// storage::IndicesInfo ListAllTextIndices(); TODO make IndicesInfo visible here
|
||||||
|
|
||||||
SearchResult Search(std::string index_name, std::string search_query) {
|
SearchResult Search(std::string index_name, std::string search_query) {
|
||||||
auto mock_result = storage[index_name].begin();
|
auto mock_result = storage[index_name].begin();
|
||||||
return SearchResult{.id = mock_result->first, .document = mock_result->second, .score = 1.0};
|
return SearchResult{.id = mock_result->first, .document = mock_result->second, .score = 1.0};
|
||||||
|
Loading…
Reference in New Issue
Block a user