plan_c.h 1.9 KB
Newer Older
F
FluorineDog 已提交
1 2 3 4 5 6 7 8 9 10 11
// Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
// or implied. See the License for the specific language governing permissions and limitations under the License

X
xige-16 已提交
12 13 14 15
#ifdef __cplusplus
extern "C" {
#endif

F
FluorineDog 已提交
16 17
#include <stdbool.h>
#include <stdint.h>
18

X
XuanYang-cn 已提交
19
#include "common/type_c.h"
20
#include "segcore/collection_c.h"
X
xige-16 已提交
21

22
typedef void* CSearchPlan;
X
xige-16 已提交
23
typedef void* CPlaceholderGroup;
24
typedef void* CRetrievePlan;
X
xige-16 已提交
25

26
CStatus
27
CreateSearchPlan(CCollection col, const char* dsl, CSearchPlan* res_plan);
28

29
// Note: serialized_expr_plan is of binary format
30
CStatus
31
CreateSearchPlanByExpr(CCollection col, const void* serialized_expr_plan, const int64_t size, CSearchPlan* res_plan);
32

33
CStatus
34
ParsePlaceholderGroup(CSearchPlan plan,
35 36
                      const void* placeholder_group_blob,
                      const int64_t blob_size,
37
                      CPlaceholderGroup* res_placeholder_group);
X
xige-16 已提交
38

F
FluorineDog 已提交
39
int64_t
X
xige-16 已提交
40
GetNumOfQueries(CPlaceholderGroup placeholder_group);
X
xige-16 已提交
41

F
FluorineDog 已提交
42
int64_t
43
GetTopK(CSearchPlan plan);
X
xige-16 已提交
44

45 46 47
CStatus
GetFieldID(CSearchPlan plan, int64_t* field_id);

G
GuoRentong 已提交
48
const char*
49
GetMetricType(CSearchPlan plan);
G
GuoRentong 已提交
50

X
xige-16 已提交
51
void
52
DeleteSearchPlan(CSearchPlan plan);
X
xige-16 已提交
53 54

void
X
xige-16 已提交
55
DeletePlaceholderGroup(CPlaceholderGroup placeholder_group);
X
xige-16 已提交
56

57
CStatus
58 59 60 61
CreateRetrievePlanByExpr(CCollection c_col,
                         const void* serialized_expr_plan,
                         const int64_t size,
                         CRetrievePlan* res_plan);
Y
yukun 已提交
62

63 64 65
void
DeleteRetrievePlan(CRetrievePlan plan);

X
xige-16 已提交
66 67
#ifdef __cplusplus
}
F
FluorineDog 已提交
68
#endif