ddc
|
#include <BranchServer.h>
Public Member Functions | |
CRunQueryData (const string &_Query="", const string &_ResultFormat="JSON", size_t _Start=0, size_t _Limit=10, int _TimeOut=10, string *_pErrorStr=NULL) | |
virtual | ~CRunQueryData () |
void | Init (const string &_Query="", const string &_ResultFormat="JSON", size_t _Start=0, size_t _Limit=10, int _TimeOut=10, string *_pErrorStr=NULL, const string &_ReqPath="", const NavHint &_Hint=NavHint()) |
void | Clear () |
CQuery * | Query () const |
CQueryOptions * | QueryOptions () const |
bool | IsPruneQuery () const |
void | toString (string &Response, size_t WorkerId=0, const DDCVersionT &vCompat=DDCVersion) |
Public Attributes | |
string | sQuery |
query string More... | |
string | sResultFormat |
result format (string) More... | |
size_t | StartHitNo |
first hit to return More... | |
size_t | ResultLimit |
max number of hits to return More... | |
int | TimeOut |
query timeout (seconds) More... | |
int | iInternalError |
internal error code More... | |
int | iNetworkError |
network error code More... | |
size_t | EndHitNo |
final hit number returned More... | |
size_t | HitsCount |
total number of hits More... | |
size_t | RelevantDocsCount |
? More... | |
CSelectedHosts | SelectedHosts |
maps immediate subcorpora to selected sub-subcorpora More... | |
string | HitDistrib |
? More... | |
string | DocDistrib |
? More... | |
string | HitsKey |
key for response body data (json only) More... | |
string | ResponseBody |
response body data More... | |
string * | pErrorStr |
error string pointer (empty or NULL for success) More... | |
string | ReqPath |
request path (>=v2.2.8) More... | |
NavHintKey | navKey |
navigation hint key More... | |
NavHint | navHint |
user- or cache-supplied navigation hint More... | |
CQueryCompiler * | pQCompiler |
query compiler for parsing input queries (parsed query is pQCompiler->m_pQuery) More... | |
DDC branch server 'run_query' paramter & intermediate result-type
CRunQueryData::CRunQueryData | ( | const string & | _Query = "" , |
const string & | _ResultFormat = "JSON" , |
||
size_t | _Start = 0 , |
||
size_t | _Limit = 10 , |
||
int | _TimeOut = 10 , |
||
string * | _pErrorStr = NULL |
||
) |
constructor
References pQCompiler, sQuery, sResultFormat, and Trim().
|
virtual |
destructor
References pQCompiler.
void CRunQueryData::Init | ( | const string & | _Query = "" , |
const string & | _ResultFormat = "JSON" , |
||
size_t | _Start = 0 , |
||
size_t | _Limit = 10 , |
||
int | _TimeOut = 10 , |
||
string * | _pErrorStr = NULL , |
||
const string & | _ReqPath = "" , |
||
const NavHint & | _Hint = NavHint() |
||
) |
(re-)initialize with parameters
References NavHintKey::assign(), Clear(), errParseError, iInternalError, navHint, navKey, CQueryCompiler::ParseQuery(), pErrorStr, pQCompiler, ReqPath, ResultLimit, sQuery, sResultFormat, StartHitNo, TimeOut, and Trim().
Referenced by CDDCBranchServer::handle__get_first_hits(), CDDCBranchServer::handle__run_query(), and CDDCBranchServer::RunDistributed().
void CRunQueryData::Clear | ( | ) |
clear object
References CQueryCompiler::CleanParser(), NavHintKey::clear(), NavHint::clear(), CSelectedHosts::Clear(), ClearString(), DocDistrib, EndHitNo, errNone, HitDistrib, HitsCount, HitsKey, iInternalError, iNetworkError, navHint, navKey, neSuccess, pErrorStr, pQCompiler, RelevantDocsCount, ReqPath, ResponseBody, ResultLimit, SelectedHosts, sQuery, sResultFormat, StartHitNo, and TimeOut.
Referenced by Init().
|
inline |
convenience method for accessing compiled query
References CQueryCompiler::m_pQuery.
|
inline |
convenience method for accessing compiled query
Referenced by CDDCBranchServer::ReadSelectedHosts(), and CDDCBranchServer::RunGetFirstHits().
|
inline |
is this a prune-query?
References DDCVersion().
Referenced by CDDCBranchServer::handle__get_hit_strings(), CDDCBranchServer::RunDistributed(), and CDDCBranchServer::RunGetFirstHits().
void CRunQueryData::toString | ( | string & | Response, |
size_t | WorkerId = 0 , |
||
const DDCVersionT & | vCompat = DDCVersion |
||
) |
populate response string Response
References DDC_ResultJson, DocDistrib, EndHitNo, Format(), CConcSession::GetResultFormatByString(), HitDistrib, HitsCount, HitsKey, iInternalError, iNetworkError, jsonStr(), navHint, pErrorStr, RelevantDocsCount, ResponseBody, sResultFormat, and NavHint::toString().
Referenced by CDDCBranchServer::handle__run_query().
string CRunQueryData::sQuery |
query string
Referenced by Clear(), CRunQueryData(), CDDCBranchServer::handle__run_query(), Init(), and CDDCBranchServer::ReadSelectedHosts().
string CRunQueryData::sResultFormat |
result format (string)
Referenced by Clear(), CRunQueryData(), CDDCBranchServer::handle__get_hit_strings(), Init(), CDDCBranchServer::RunDistributed(), and toString().
size_t CRunQueryData::StartHitNo |
size_t CRunQueryData::ResultLimit |
max number of hits to return
Referenced by Clear(), CDDCBranchServer::GetFirstHitsFromCorpora(), CDDCBranchServer::GetHitContexts(), CDDCBranchServer::GetHitCounts(), CDDCBranchServer::handle__get_first_hits(), CDDCBranchServer::handle__get_hit_strings(), Init(), CDDCBranchServer::RunDistributed(), and CDDCBranchServer::RunGetFirstHits().
int CRunQueryData::TimeOut |
query timeout (seconds)
Referenced by Clear(), CDDCBranchServer::GetFirstHitsFromCorpora(), CDDCBranchServer::handle__get_hit_strings(), Init(), CDDCBranchServer::RunDistributed(), and CDDCBranchServer::RunGetFirstHits().
int CRunQueryData::iInternalError |
int CRunQueryData::iNetworkError |
network error code
Referenced by Clear(), CDDCBranchServer::handle__get_hit_strings(), CDDCBranchServer::RunDistributed(), CDDCBranchServer::RunGetFirstHits(), and toString().
size_t CRunQueryData::EndHitNo |
final hit number returned
Referenced by Clear(), CDDCBranchServer::GetFirstHitsFromCorpora(), CDDCBranchServer::handle__get_first_hits(), CDDCBranchServer::handle__get_hit_strings(), CDDCBranchServer::RunDistributed(), CDDCBranchServer::RunGetFirstHits(), and toString().
size_t CRunQueryData::HitsCount |
total number of hits
Referenced by Clear(), CDDCBranchServer::handle__get_hit_strings(), CDDCBranchServer::RunDistributed(), CDDCBranchServer::RunGetFirstHits(), and toString().
size_t CRunQueryData::RelevantDocsCount |
?
Referenced by Clear(), CDDCBranchServer::RunDistributed(), CDDCBranchServer::RunGetFirstHits(), and toString().
CSelectedHosts CRunQueryData::SelectedHosts |
maps immediate subcorpora to selected sub-subcorpora
Referenced by Clear(), CDDCBranchServer::handle__get_hit_strings(), CDDCBranchServer::ReadSelectedHosts(), CDDCBranchServer::RunDistributed(), CDDCBranchServer::RunGetFirstHits(), and CDDCBranchServer::UpdateNavCache().
string CRunQueryData::HitDistrib |
?
Referenced by Clear(), CDDCBranchServer::handle__get_hit_strings(), CDDCBranchServer::RunDistributed(), and toString().
string CRunQueryData::DocDistrib |
?
Referenced by Clear(), CDDCBranchServer::handle__get_hit_strings(), CDDCBranchServer::RunDistributed(), and toString().
string CRunQueryData::HitsKey |
key for response body data (json only)
Referenced by Clear(), CDDCLeafServer::GetHitContexts(), CDDCLeafServer::GetHitCounts(), CDDCBranchServer::handle__get_hit_strings(), CDDCBranchServer::RunDistributed(), and toString().
string CRunQueryData::ResponseBody |
response body data
Referenced by Clear(), CDDCLeafServer::GetHitContexts(), CDDCLeafServer::GetHitCounts(), CDDCBranchServer::handle__get_hit_strings(), CDDCBranchServer::RunDistributed(), CDDCBranchServer::RunGetFirstHits(), and toString().
string* CRunQueryData::pErrorStr |
error string pointer (empty or NULL for success)
Referenced by Clear(), Init(), and toString().
string CRunQueryData::ReqPath |
request path (>=v2.2.8)
Referenced by CDDCBranchServer::AlignCorpusPath(), Clear(), CDDCBranchServer::GetFirstHitsFromCorpora(), and Init().
NavHintKey CRunQueryData::navKey |
navigation hint key
Referenced by Clear(), CDDCBranchServer::GetHitContexts(), Init(), CDDCBranchServer::RunGetFirstHits(), and CDDCBranchServer::UpdateNavCache().
NavHint CRunQueryData::navHint |
user- or cache-supplied navigation hint
Referenced by Clear(), CDDCBranchServer::GetFirstHitsFromCorpora(), CDDCBranchServer::GetHitContexts(), CDDCBranchServer::handle__get_hit_strings(), Init(), CDDCBranchServer::RunDistributed(), CDDCBranchServer::RunGetFirstHits(), toString(), and CDDCBranchServer::UpdateNavCache().
CQueryCompiler* CRunQueryData::pQCompiler |
query compiler for parsing input queries (parsed query is pQCompiler->m_pQuery)
Referenced by Clear(), CRunQueryData(), Init(), CDDCBranchServer::ReadSelectedHosts(), and ~CRunQueryData().