ddc
|
parsed get_first_hits response More...
#include <BranchServer.h>
Public Member Functions | |
~CFirstHitsQueryResult () | |
void | Clear () |
bool | HasErrors () const |
void | CloseSockets () |
void | CollectCounts () |
void | PruneHits (size_t PruneLimit) |
size_t | HostHitsLimit (const vector< size_t > &HostHitIds) |
size_t | PhysicalOffset (size_t LogicalHitNo) const |
size_t | LogicalOffset (size_t PhysicalHitNo) const |
size_t | LogicalMax (size_t LogicalHitNo) const |
size_t | PhysicalMax (size_t LogicalHitNo) const |
size_t | LogicalSize (size_t StartHitNo, size_t ResultLimit) const |
Public Attributes | |
size_t | m_AllHitsCount |
size_t | m_AllRelevantDocsCount |
string | m_HitsDistributionStr |
string | m_RelevantDocsDistributionStr |
int | m_InternalError |
HitSortOrderEnum | m_SortOrder |
NetworkErrorsEnum | m_NetworkError |
string | m_ErrorStr |
vector< CHitToSort > | m_Hits |
vector< size_t > | m_DtrEnds |
vector< int > | m_Sockets |
size_t | m_Offset |
parsed get_first_hits response
|
inline |
destructor implicitly calls CloseSockets()
void CFirstHitsQueryResult::Clear | ( | ) |
clear the object
References ClearVector(), errNone, hsoNone, m_AllHitsCount, m_AllRelevantDocsCount, m_DtrEnds, m_Hits, m_HitsDistributionStr, m_InternalError, m_NetworkError, m_Offset, m_RelevantDocsDistributionStr, m_Sockets, m_SortOrder, and neSuccess.
Referenced by CDDCBranchServer::RunGetFirstHits().
|
inline |
check whether this result raised any errors
References errNone, and neSuccess.
Referenced by CDDCBranchServer::GetHitContexts(), and CDDCBranchServer::RunGetFirstHits().
void CFirstHitsQueryResult::CloseSockets | ( | ) |
close any previously opened sockets
References CloseSocket(), m_Sockets, and SendString().
Referenced by CDDCBranchServer::GetHitContexts(), CDDCBranchServer::GetHitCounts(), and CDDCBranchServer::RunGetFirstHits().
void CFirstHitsQueryResult::CollectCounts | ( | ) |
collect counts by sort-key, only makes sense if m_SortOrder==hsoCounts ; also modifies m_AllHitsCount
References hsoAscendingCountKeys, hsoAscendingCountValues, hsoDescendingCountKeys, hsoDescendingCountValues, IsCountSort(), m_AllHitsCount, CHitToSort::m_HitNo, m_Hits, CHitToSort::m_SortKeyStr, m_SortOrder, and CHitToSort::steal().
Referenced by CDDCBranchServer::RunGetFirstHits().
void CFirstHitsQueryResult::PruneHits | ( | size_t | PruneLimit | ) |
prune hits by sort-key, only makes sense for #prune[]-sorts; also modifies m_AllHitsCount
References m_AllHitsCount, m_Hits, CHitToSort::m_SortKeyStr, and CHitToSort::steal().
Referenced by CDDCBranchServer::RunGetFirstHits().
size_t CFirstHitsQueryResult::HostHitsLimit | ( | const vector< size_t > & | HostHitIds | ) |
compute the number of hits we need to request to cover all physical hit-offsets (for a single host) in HostHits
References m_Hits.
|
inline |
convert a logical branch-level hit offset to a physical index in m_Hits[] (no boundary-checking, underflow possible)
Referenced by CDDCBranchServer::GetHitContexts(), CDDCBranchServer::GetHitCounts(), CDDCBranchServer::handle__get_first_hits(), and CDDCBranchServer::RunGetFirstHits().
|
inline |
convert a physical offset in m_Hits[] to a logical branch-level hit offset (no boundary-checking, no underflow)
Referenced by CDDCBranchServer::GetHitContexts(), CDDCBranchServer::handle__get_first_hits(), and CDDCBranchServer::RunGetFirstHits().
|
inline |
returns the logical upper bound hit offset for LogicalHitNo, with boundary-checking
Referenced by CDDCBranchServer::handle__get_hit_strings(), CDDCBranchServer::RunDistributed(), and CDDCBranchServer::RunGetFirstHits().
|
inline |
returns the physical upper bound hit offset LogicalHitNo, with boundary-checking
Referenced by CDDCBranchServer::GetHitContexts(), CDDCBranchServer::GetHitCounts(), CDDCBranchServer::handle__get_first_hits(), and CDDCBranchServer::RunGetFirstHits().
|
inline |
returns the number of items in m_Hits[] logical range [StartHitNo,StartHitNo+ResultLimit), with boundary-checking
Referenced by CDDCBranchServer::handle__get_hit_strings().
size_t CFirstHitsQueryResult::m_AllHitsCount |
size_t CFirstHitsQueryResult::m_AllRelevantDocsCount |
string CFirstHitsQueryResult::m_HitsDistributionStr |
string CFirstHitsQueryResult::m_RelevantDocsDistributionStr |
int CFirstHitsQueryResult::m_InternalError |
HitSortOrderEnum CFirstHitsQueryResult::m_SortOrder |
NetworkErrorsEnum CFirstHitsQueryResult::m_NetworkError |
string CFirstHitsQueryResult::m_ErrorStr |
vector<CHitToSort> CFirstHitsQueryResult::m_Hits |
vector<size_t> CFirstHitsQueryResult::m_DtrEnds |
Referenced by Clear(), CDDCBranchServer::GetFirstHitsFromCorpora(), and CDDCBranchServer::GetHitContexts().
vector< int > CFirstHitsQueryResult::m_Sockets |
Referenced by Clear(), CloseSockets(), CDDCBranchServer::GetFirstHitsFromCorpora(), and CDDCBranchServer::GetHitContexts().
size_t CFirstHitsQueryResult::m_Offset |
Referenced by Clear(), CDDCBranchServer::GetFirstHitsFromCorpora(), and CDDCBranchServer::RunGetFirstHits().