xapian-core  1.4.21
remotesubmatch.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2006,2007,2009,2011,2014,2015 Olly Betts
5  * Copyright (C) 2007,2008 Lemur Consulting Ltd
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #ifndef XAPIAN_INCLUDED_REMOTESUBMATCH_H
23 #define XAPIAN_INCLUDED_REMOTESUBMATCH_H
24 
25 #include "submatch.h"
27 #include "xapian/weight.h"
28 
29 namespace Xapian {
30  class MatchSpy;
31 }
32 
34 class RemoteSubMatch : public SubMatch {
36  void operator=(const RemoteSubMatch &);
37 
40 
43 
49 
52 
55 
57  const vector<Xapian::Internal::opt_intrusive_ptr<Xapian::MatchSpy>> & matchspies;
58 
59  public:
62  bool decreasing_relevance_,
64 
66  bool prepare_match(bool nowait, Xapian::Weight::Internal & total_stats);
67 
69  void start_match(Xapian::doccount first,
70  Xapian::doccount maxitems,
71  Xapian::doccount check_at_least,
72  Xapian::Weight::Internal & total_stats);
73 
75  PostList * get_postlist(MultiMatch * matcher,
76  Xapian::termcount* total_subqs_ptr,
77  Xapian::Weight::Internal& total_stats);
78 
81  return uncollapsed_upper_bound;
82  }
83 
85  double get_percent_factor() const { return percent_factor; }
86 
88  void get_mset(Xapian::MSet & mset) { db->get_mset(mset, matchspies); }
89 };
90 
91 #endif /* XAPIAN_INCLUDED_REMOTESUBMATCH_H */
The Xapian namespace contains public interfaces for the Xapian library.
Definition: compactor.cc:80
void get_mset(Xapian::MSet &mset)
Short-cut for single remote match.
Abstract base class for postlists.
Definition: postlist.h:37
Class representing a list of search results.
Definition: mset.h:44
RemoteDatabase is the baseclass for remote database implementations.
double percent_factor
The factor to use to convert weights to percentages.
RemoteDatabase * db
The remote database.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Definition: types.h:72
void get_mset(Xapian::MSet &mset, const vector< Xapian::Internal::opt_intrusive_ptr< Xapian::MatchSpy >> &matchspies)
Get the MSet from the remote server.
Xapian::doccount get_uncollapsed_upper_bound() const
Get uncollapsed_upper_bound from the remote MSet.
base class for sub-matchers
Class to hold statistics for a given collection.
const vector< Xapian::Internal::opt_intrusive_ptr< Xapian::MatchSpy > > & matchspies
The matchspies to use.
RemoteDatabase is the baseclass for remote database implementations.
Weighting scheme API.
double get_percent_factor() const
Get percentage factor - only valid after get_postlist().
bool decreasing_relevance
Is the sort order such the relevance decreases down the MSet?
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Definition: types.h:38
Xapian::doccount uncollapsed_upper_bound
uncollapsed_upper_bound from the remote MSet.
Class for performing matching on a remote database.