xapian-core  1.4.25
Public Member Functions | List of all members
SubMatch Class Referenceabstract

#include <submatch.h>

+ Inheritance diagram for SubMatch:
+ Collaboration diagram for SubMatch:

Public Member Functions

virtual ~SubMatch ()
 Virtual destructor. More...
virtual bool prepare_match (bool nowait, Xapian::Weight::Internal &total_stats)=0
 Fetch and collate statistics. More...
virtual void start_match (Xapian::doccount first, Xapian::doccount maxitems, Xapian::doccount check_at_least, Xapian::Weight::Internal &total_stats)=0
 Start the match. More...
virtual PostListget_postlist (MultiMatch *matcher, Xapian::termcount *total_subqs_ptr, Xapian::Weight::Internal &total_stats)=0
 Get PostList. More...
- Public Member Functions inherited from Xapian::Internal::intrusive_base
 intrusive_base ()
 Construct with no references. More...

Additional Inherited Members

- Public Attributes inherited from Xapian::Internal::intrusive_base
unsigned _refs
 Reference count. More...

Detailed Description

Definition at line 33 of file submatch.h.

Constructor & Destructor Documentation

◆ ~SubMatch()

virtual SubMatch::~SubMatch ( )

Virtual destructor.

Required because we have virtual methods and delete derived objects via a pointer to this base class.

Definition at line 40 of file submatch.h.

References get_postlist(), prepare_match(), and start_match().

Member Function Documentation

◆ get_postlist()

virtual PostList* SubMatch::get_postlist ( MultiMatch matcher,
Xapian::termcount total_subqs_ptr,
Xapian::Weight::Internal total_stats 
pure virtual

Get PostList.

Implemented in LocalSubMatch, and RemoteSubMatch.

Referenced by ~SubMatch().

◆ prepare_match()

virtual bool SubMatch::prepare_match ( bool  nowait,
Xapian::Weight::Internal total_stats 
pure virtual

Fetch and collate statistics.

Before we can calculate term weights we need to fetch statistics from each database involved and collate them.

nowaitA RemoteSubMatch may not be able to report statistics when first asked. If nowait is true, it will return false in this situation allowing the matcher to ask other database. If nowait is false, then this method will block until statistics are available.
total_statsA stats object to which the statistics should be added.
If nowait is true and results aren't available yet then false will be returned and this method must be called again before the match can proceed. If results are available or nowait is false, then this method returns true.

Implemented in LocalSubMatch, and RemoteSubMatch.

Referenced by prepare_sub_matches(), and ~SubMatch().

◆ start_match()

virtual void SubMatch::start_match ( Xapian::doccount  first,
Xapian::doccount  maxitems,
Xapian::doccount  check_at_least,
Xapian::Weight::Internal total_stats 
pure virtual

Start the match.

firstThe first item in the result set to return.
maxitemsThe maximum number of items to return.
check_at_leastThe minimum number of items to check.
total_statsThe total statistics for the collection.

Implemented in LocalSubMatch, and RemoteSubMatch.

Referenced by ~SubMatch().

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