Mod:searchtask_new_instance_error
This commit is contained in:
parent
1ecc06d0f8
commit
149dc03bfc
@ -69,33 +69,13 @@ int SearchTask::Process(CTaskRequest *request)
|
|||||||
if(query.isObject()){
|
if(query.isObject()){
|
||||||
if(query.isMember(MATCH)){
|
if(query.isMember(MATCH)){
|
||||||
query_process_ = new MatchQueryProcess(query[MATCH]);
|
query_process_ = new MatchQueryProcess(query[MATCH]);
|
||||||
} else {
|
}else if(query.isMember(TERM)){
|
||||||
log_error("Match query init error.");
|
|
||||||
return -RT_PARSE_JSON_ERR;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(query.isMember(TERM)){
|
|
||||||
query_process_ = new TermQueryProcess(query[TERM]);
|
query_process_ = new TermQueryProcess(query[TERM]);
|
||||||
} else {
|
}else if (query.isMember(GEODISTANCE)){
|
||||||
log_error("Match query init error.");
|
|
||||||
return -RT_PARSE_JSON_ERR;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (query.isMember(GEODISTANCE)){
|
|
||||||
query_process_ = new GeoDistanceQueryProcess(query[GEODISTANCE]);
|
query_process_ = new GeoDistanceQueryProcess(query[GEODISTANCE]);
|
||||||
}else{
|
}else if (query.isMember(GEOSHAPE)){
|
||||||
log_error("GeoDistance query init error.");
|
|
||||||
return -RT_PARSE_JSON_ERR;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (query.isMember(GEOSHAPE)){
|
|
||||||
query_process_ = new GeoShapeQueryProcess(query[GEOSHAPE]);
|
query_process_ = new GeoShapeQueryProcess(query[GEOSHAPE]);
|
||||||
}else{
|
}else if (query.isMember(RANGE)){
|
||||||
log_error("GeoShape query init error.");
|
|
||||||
return -RT_PARSE_JSON_ERR;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (query.isMember(RANGE)){
|
|
||||||
if (component_->TerminalTag()){
|
if (component_->TerminalTag()){
|
||||||
query_process_ = RangeQueryGenerator::Instance()->GetRangeQueryProcess(E_INDEX_READ_RANGE_PRE_TERM
|
query_process_ = RangeQueryGenerator::Instance()->GetRangeQueryProcess(E_INDEX_READ_RANGE_PRE_TERM
|
||||||
, query[RANGE]);
|
, query[RANGE]);
|
||||||
@ -103,15 +83,10 @@ int SearchTask::Process(CTaskRequest *request)
|
|||||||
query_process_ = RangeQueryGenerator::Instance()->GetRangeQueryProcess(E_INDEX_READ_RANGE
|
query_process_ = RangeQueryGenerator::Instance()->GetRangeQueryProcess(E_INDEX_READ_RANGE
|
||||||
, query[RANGE]);
|
, query[RANGE]);
|
||||||
}
|
}
|
||||||
}else{
|
}else if (query.isMember(BOOL)){
|
||||||
log_error("Range query init error.");
|
|
||||||
return -RT_PARSE_JSON_ERR;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (query.isMember(BOOL)){
|
|
||||||
query_process_ = new BoolQueryProcess(query[BOOL]);
|
query_process_ = new BoolQueryProcess(query[BOOL]);
|
||||||
}else{
|
}else{
|
||||||
log_error("Bool query init error.");
|
log_error("no suit query process.");
|
||||||
return -RT_PARSE_JSON_ERR;
|
return -RT_PARSE_JSON_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user