ddc
|
#include <QueryFilter.h>
Public Member Functions | |
CQFilter API | |
CQFPrune (HitSortEnum ftype=LessByPruneKey, size_t Limit=0, CQCountKeyExprList *Keys=NULL) | |
virtual | ~CQFPrune () |
Default destructor (empty) More... | |
virtual CQFilter * | Clone () |
clone this filter (also clones m_keys) More... | |
virtual bool | Compile (CQueryCompiler *compiler, CQueryOptions *options) |
apply the filter to the given compiler More... | |
ddcObject API | |
virtual string | toString (void) |
convert filter to a canonical string More... | |
virtual string | jsonClass (void) |
virtual string | jsonData (void) |
virtual ddcObjectList | Children () const |
virtual void | DisownChildren () |
CQFPrune local methods | |
void | PruneHitsIndex (const CQuery *qRoot, vector< size_t > &PeriodHitsIndex) |
Public Member Functions inherited from CQFSort | |
CQFSort (HitSortEnum ftype=NoSort, const string &arg0=string(""), const string &arg1=string(""), const string &arg2=string("")) | |
CQFSort (HitSortEnum ftype, const string &arg0, int arg1i, int arg2i) | |
virtual | ~CQFSort () |
virtual HitSortEnum | FilterType () const |
sort-type for this filter (if any) More... | |
void | SortBounds (void) |
swap lower- and upper-bounds if they not in logical order More... | |
string | ResolveAttributeName (CQueryCompiler *compiler, const string &attrName, bool allowBiblExpander=false) |
CFreeBiblIndex * | GetBiblConstant (CQueryCompiler *compiler, const string &attrName, bool allowBiblExpander=true) |
compilation & satisfiability-check utility: return constant bibliographic index for attrName (if it is one), or NULL More... | |
string | argString (const string &arg) const |
stringification utility: quoted strign for arg, or empty string More... | |
virtual string | jsonMinMax (void) |
virtual string | jsonType (void) |
Public Member Functions inherited from CQFilter | |
CQFilter () | |
Default constructor. More... | |
virtual | ~CQFilter () |
Default destructor (empty) More... | |
virtual bool | CheckSatisfiable (CQueryCompiler *compiler, CQueryOptions *options) |
Run fast (un)satisfiability checks for filter before Compile() is called. Default just returns true. More... | |
Public Member Functions inherited from ddcObject | |
ddcObject () | |
Default constructor. More... | |
virtual | ~ddcObject () |
virtual destructor does nothing More... | |
template<typename Visit > | |
ddcObject * | Traverse (Visit &visit) |
template<typename Visit > | |
ddcObject * | Traverse (Visit &visit) const |
template<typename Visit > | |
ddcObject * | TraverseR (Visit &visit) |
template<typename Visit > | |
ddcObject * | TraverseR (Visit &visit) const |
virtual ddcObjectList | Descendants () const |
virtual string | toJson () |
Public Attributes | |
size_t | m_limit |
maximum number of hits per count-key More... | |
CQCountKeyExprList * | m_keys |
list count-keys (externally allocated, freed here) More... | |
CCountMap | m_Counts |
underlying counts More... | |
Public Attributes inherited from CQFSort | |
CDDCFilterWithBounds | m_Filter |
underlying DDC Filter struct More... | |
std::string | m_arg0 |
0th argument (e.g. field name) More... | |
std::string | m_arg1 |
1st argument (e.g. lower bound) More... | |
std::string | m_arg2 |
2nd argument (e.g. upper bound) More... | |
Public Attributes inherited from ddcObject | |
void * | m_User |
user data associated with this object (for use e.g. by perl wrappers) More... | |
class for global query pruning filters m_arg0 : pruning limit (maximum number of hits per key)
CQFPrune::CQFPrune | ( | HitSortEnum | ftype = LessByPruneKey , |
size_t | Limit = 0 , |
||
CQCountKeyExprList * | Keys = NULL |
||
) |
References CDDCFilterWithBounds::m_bSet, CQFSort::m_Filter, CDDCFilterWithBounds::m_KeyHi, and CDDCFilterWithBounds::m_KeyLo.
Referenced by Clone().
|
virtual |
Default destructor (empty)
References m_keys.
|
virtual |
clone this filter (also clones m_keys)
Reimplemented from CQFSort.
References CQFPrune(), CQFSort::m_Filter, CDDCFilterWithBounds::m_FilterType, m_keys, m_limit, and CDDCFilterWithBounds::m_Parent.
|
virtual |
apply the filter to the given compiler
Reimplemented from CQFSort.
References CQFSort::Compile(), CQCountKeyExprList::Compile(), and m_keys.
|
virtual |
convert filter to a canonical string
Reimplemented from CQFSort.
References CQCountKeyExprList::empty(), EngMakeUpper(), Format(), HitSortEnumStrings, CQFSort::m_Filter, CDDCFilterWithBounds::m_FilterType, m_keys, m_limit, and CQCountKeyExprList::toString().
|
inlinevirtual |
class-name for json strinfication
Reimplemented from CQFSort.
References ddcObject::Children(), ddcObject::DisownChildren(), and ddcObject::jsonData().
|
virtual |
instance data for json stringification
Reimplemented from CQFSort.
References CQCountKeyExprList::empty(), Format(), m_keys, m_limit, and CQuery::toJson().
|
virtual |
get a list of direct ddcObject daughters of this node
Reimplemented from ddcObject.
References ddcObject::Children(), and m_keys.
|
virtual |
void CQFPrune::PruneHitsIndex | ( | const CQuery * | qRoot, |
vector< size_t > & | PeriodHitsIndex | ||
) |
apply pruning filter to PeriodHitsIndex, assigning hit sort-key strings as we go
References CQCountKeyExprList::Evaluate(), hsoDescending, CQuery::m_Compiler, m_Counts, CQFSort::m_Filter, CQueryNode::m_Hits, m_keys, m_limit, CQuery::m_Node, CConcSession::m_pConcordance, CQueryCompiler::m_pHolder, and CDDCFilterWithBounds::SortOrder().
size_t CQFPrune::m_limit |
maximum number of hits per count-key
Referenced by Clone(), jsonData(), PruneHitsIndex(), and toString().
CQCountKeyExprList* CQFPrune::m_keys |
list count-keys (externally allocated, freed here)
Referenced by Children(), Clone(), Compile(), DisownChildren(), jsonData(), PruneHitsIndex(), toString(), and ~CQFPrune().
CCountMap CQFPrune::m_Counts |
underlying counts
Referenced by PruneHitsIndex().