xapian-core  1.4.21
submatch.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2006,2007,2009,2011,2014 Olly Betts
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef XAPIAN_INCLUDED_SUBMATCH_H
22 #define XAPIAN_INCLUDED_SUBMATCH_H
23 
24 #include "xapian/intrusive_ptr.h"
25 #include <xapian/types.h>
26 
27 #include "api/omenquireinternal.h"
28 #include "api/postlist.h"
29 #include "xapian/weight.h"
30 
31 class MultiMatch;
32 
34  public:
40  virtual ~SubMatch() { }
41 
62  virtual bool prepare_match(bool nowait,
63  Xapian::Weight::Internal & total_stats) = 0;
64 
72  virtual void start_match(Xapian::doccount first,
73  Xapian::doccount maxitems,
74  Xapian::doccount check_at_least,
75  Xapian::Weight::Internal & total_stats) = 0;
76 
78  virtual PostList * get_postlist(MultiMatch *matcher,
79  Xapian::termcount* total_subqs_ptr,
80  Xapian::Weight::Internal& total_stats) = 0;
81 };
82 
83 #endif /* XAPIAN_INCLUDED_SUBMATCH_H */
Abstract base class for postlists.
Definition: postlist.h:37
typedefs for Xapian
virtual bool prepare_match(bool nowait, Xapian::Weight::Internal &total_stats)=0
Fetch and collate statistics.
Abstract base class for postlists.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Definition: types.h:72
Class to hold statistics for a given collection.
Base class for objects managed by intrusive_ptr.
Definition: intrusive_ptr.h:49
Weighting scheme API.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Definition: types.h:38
virtual ~SubMatch()
Virtual destructor.
Definition: submatch.h:40
virtual PostList * get_postlist(MultiMatch *matcher, Xapian::termcount *total_subqs_ptr, Xapian::Weight::Internal &total_stats)=0
Get PostList.
virtual void start_match(Xapian::doccount first, Xapian::doccount maxitems, Xapian::doccount check_at_least, Xapian::Weight::Internal &total_stats)=0
Start the match.