diff --git a/cpp/src/thrift/VectorService.thrift b/cpp/src/thrift/VectorService.thrift index 442b612f1a..36bab9c69f 100644 --- a/cpp/src/thrift/VectorService.thrift +++ b/cpp/src/thrift/VectorService.thrift @@ -100,8 +100,11 @@ service VecService { /** * search interfaces - * if time_range_list is empty, engine will search without time limit - * + * you can use filter to reduce search result + * filter.attrib_filter can specify which attribute you need, for example: + * set attrib_filter = {"color":""} means you want to get "color" attribute for result vector + * set attrib_filter = {"color":"red"} means you want to get vectors which has attribute "color" equals "red" + * if filter.time_range is empty, engine will search without time limit */ VecSearchResult search_vector(2: string group_id, 3: i64 top_k, 4: VecTensor tensor, 5: VecSearchFilter filter) throws(1: VecException e); VecSearchResultList search_vector_batch(2: string group_id, 3: i64 top_k, 4: VecTensorList tensor_list, 5: VecSearchFilter filter) throws(1: VecException e); diff --git a/cpp/src/thrift/gen-cpp/VecService.h b/cpp/src/thrift/gen-cpp/VecService.h index 7d2ab677d3..d1bfc68d9d 100644 --- a/cpp/src/thrift/gen-cpp/VecService.h +++ b/cpp/src/thrift/gen-cpp/VecService.h @@ -45,8 +45,11 @@ class VecServiceIf { /** * search interfaces - * if time_range_list is empty, engine will search without time limit - * + * you can use filter to reduce search result + * filter.attrib_filter can specify which attribute you need, for example: + * set attrib_filter = {"color":""} means you want to get "color" attribute for result vector + * set attrib_filter = {"color":"red"} means you want to get vectors which has attribute "color" equals "red" + * if filter.time_range is empty, engine will search without time limit * * @param group_id * @param top_k diff --git a/cpp/src/thrift/gen-cpp/VecService_server.skeleton.cpp b/cpp/src/thrift/gen-cpp/VecService_server.skeleton.cpp index 2e29eb1fbb..8cd2e03b16 100644 --- a/cpp/src/thrift/gen-cpp/VecService_server.skeleton.cpp +++ b/cpp/src/thrift/gen-cpp/VecService_server.skeleton.cpp @@ -67,8 +67,11 @@ class VecServiceHandler : virtual public VecServiceIf { /** * search interfaces - * if time_range_list is empty, engine will search without time limit - * + * you can use filter to reduce search result + * filter.attrib_filter can specify which attribute you need, for example: + * set attrib_filter = {"color":""} means you want to get "color" attribute for result vector + * set attrib_filter = {"color":"red"} means you want to get vectors which has attribute "color" equals "red" + * if filter.time_range is empty, engine will search without time limit * * @param group_id * @param top_k