Lucene++ - a full-featured, c++ search engine
API Documentation


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MultiSearcher.h
Go to the documentation of this file.
1 
2 // Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3 // Distributable under the terms of either the Apache License (Version 2.0)
4 // or the GNU Lesser General Public License.
6 
7 #ifndef MULTISEARCHER_H
8 #define MULTISEARCHER_H
9 
10 #include "Searcher.h"
11 #include "Collector.h"
12 
13 namespace Lucene {
14 
19 class LPPAPI MultiSearcher : public Searcher {
20 public:
23 
24  virtual ~MultiSearcher();
25 
27 
28 protected:
29  Collection<SearchablePtr> searchables;
31  int32_t _maxDoc;
32 
33 public:
34  using Searcher::search;
35 
37  Collection<SearchablePtr> getSearchables();
38 
39  virtual void close();
40  virtual int32_t docFreq(const TermPtr& term);
41  virtual DocumentPtr doc(int32_t n);
42  virtual DocumentPtr doc(int32_t n, const FieldSelectorPtr& fieldSelector);
43 
45  int32_t subSearcher(int32_t n);
46 
48  int32_t subDoc(int32_t n);
49 
50  virtual int32_t maxDoc();
51  virtual TopDocsPtr search(const WeightPtr& weight, const FilterPtr& filter, int32_t n);
52  virtual TopFieldDocsPtr search(const WeightPtr& weight, const FilterPtr& filter, int32_t n, const SortPtr& sort);
53  virtual void search(const WeightPtr& weight, const FilterPtr& filter, const CollectorPtr& results);
54  virtual QueryPtr rewrite(const QueryPtr& query);
55  virtual ExplanationPtr explain(const WeightPtr& weight, int32_t doc);
56 
57 protected:
58  Collection<int32_t> getStarts();
59 
73  virtual WeightPtr createWeight(const QueryPtr& query);
74 };
75 
76 }
77 
78 #endif

clucene.sourceforge.net