xapian-core  2.0.0
Public Member Functions | List of all members
Xapian::Internal::CmpMaxOrTerms Struct Reference

Class providing an operator which sorts postlists to select max or terms. More...

Public Member Functions

bool operator() (PostList *a, PostList *b)
 Return true if and only if a has a strictly greater termweight than b. More...
 

Detailed Description

Class providing an operator which sorts postlists to select max or terms.

This returns true if a has a (strictly) greater termweight than b.

Using this comparator will tend to result in multiple calls to recalc_maxweight() for each of the subqueries (we use it with nth_element which should be O(n)) - perhaps it'd be better to call recalc_maxweight() once and then sort on that.

Definition at line 89 of file queryinternal.cc.

Member Function Documentation

◆ operator()()

bool Xapian::Internal::CmpMaxOrTerms::operator() ( PostList a,
PostList b 
)
inline

Return true if and only if a has a strictly greater termweight than b.

Definition at line 91 of file queryinternal.cc.

References Xapian::Internal::PostList::recalc_maxweight().


The documentation for this struct was generated from the following file: