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

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MultiSearcher.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2011 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 {
21 public:
23 MultiSearcher(Collection<SearchablePtr> searchables);
24
25 virtual ~MultiSearcher();
26
27 LUCENE_CLASS(MultiSearcher);
28
29 protected:
30 Collection<SearchablePtr> searchables;
31 Collection<int32_t> starts;
32 int32_t _maxDoc;
33
34 public:
35 using Searcher::search;
36
38 Collection<SearchablePtr> getSearchables();
39
40 virtual void close();
41 virtual int32_t docFreq(TermPtr term);
42 virtual DocumentPtr doc(int32_t n);
43 virtual DocumentPtr doc(int32_t n, FieldSelectorPtr fieldSelector);
44
46 int32_t subSearcher(int32_t n);
47
49 int32_t subDoc(int32_t n);
50
51 virtual int32_t maxDoc();
52 virtual TopDocsPtr search(WeightPtr weight, FilterPtr filter, int32_t n);
53 virtual TopFieldDocsPtr search(WeightPtr weight, FilterPtr filter, int32_t n, SortPtr sort);
54 virtual void search(WeightPtr weight, FilterPtr filter, CollectorPtr results);
55 virtual QueryPtr rewrite(QueryPtr query);
56 virtual ExplanationPtr explain(WeightPtr weight, int32_t doc);
57
58 protected:
59 Collection<int32_t> getStarts();
60
74 virtual WeightPtr createWeight(QueryPtr query);
75 };
76 }
77
78 #endif

clucene.sourceforge.net