From 79f2d07c15380b77513a432150ddbdf3ef4e32cd Mon Sep 17 00:00:00 2001 From: shzhulin3 Date: Wed, 28 Apr 2021 11:29:15 +0800 Subject: [PATCH] fix multiple define --- src/search_local/index_read/query/bool_query_parser.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/search_local/index_read/query/bool_query_parser.cc b/src/search_local/index_read/query/bool_query_parser.cc index a28c761..2e4533b 100644 --- a/src/search_local/index_read/query/bool_query_parser.cc +++ b/src/search_local/index_read/query/bool_query_parser.cc @@ -15,11 +15,6 @@ const char* const MATCH ="match"; const char* const RANGE ="range"; const char* const GEODISTANCE ="geo_distance"; -void SetErrMsg(QueryParserRes* query_parser_res, string err_msg){ - log_error(err_msg.c_str()); - query_parser_res->ErrMsg() = err_msg; -} - BoolQueryParser::BoolQueryParser(uint32_t a, Json::Value& v) :appid(a),value(v) { @@ -55,7 +50,9 @@ int BoolQueryParser::DoJobByType(Json::Value& value, uint32_t type, QueryParserR geo_query_parser = new GeoDistanceParser(appid, value[GEODISTANCE]); return geo_query_parser->ParseContent(query_parser_res); } else { - SetErrMsg(query_parser_res, "BoolQueryParser only support term/match/range/geo_distance!"); + string err_msg = "BoolQueryParser only support term/match/range/geo_distance!"; + log_error(err_msg.c_str()); + query_parser_res->ErrMsg() = err_msg; return -RT_PARSE_CONTENT_ERROR; } return 0;