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

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

- File List
- Globals

MultiSearcher.h
Go to the documentation of this file.
1 // 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:
22 MultiSearcher(Collection<SearchablePtr> searchables);
23
24 virtual ~MultiSearcher();
25
26 LUCENE_CLASS(MultiSearcher);
27
28 protected:
29 Collection<SearchablePtr> searchables;
30 Collection<int32_t> starts;
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
Lucene::TermPtr
boost::shared_ptr< Term > TermPtr
Definition: LuceneTypes.h:233
Lucene::WeightPtr
boost::shared_ptr< Weight > WeightPtr
Definition: LuceneTypes.h:480
Lucene::MultiSearcher::starts
Collection< int32_t > starts
Definition: MultiSearcher.h:30
Lucene::FieldSelectorPtr
boost::shared_ptr< FieldSelector > FieldSelectorPtr
Definition: LuceneTypes.h:77
Searcher.h
Lucene::Searcher::search
virtual TopFieldDocsPtr search(const QueryPtr &query, const FilterPtr &filter, int32_t n, const SortPtr &sort)
Search implementation with arbitrary sorting. Finds the top n hits for query, applying filter if non-...
Lucene::DocumentPtr
boost::shared_ptr< Document > DocumentPtr
Definition: LuceneTypes.h:74
Lucene::QueryPtr
boost::shared_ptr< Query > QueryPtr
Definition: LuceneTypes.h:420
Lucene::Searcher
An abstract base class for search implementations. Implements the main search methods.
Definition: Searcher.h:18
Lucene::CollectorPtr
boost::shared_ptr< Collector > CollectorPtr
Definition: LuceneTypes.h:295
Lucene::ExplanationPtr
boost::shared_ptr< Explanation > ExplanationPtr
Definition: LuceneTypes.h:333
Lucene::SortPtr
boost::shared_ptr< Sort > SortPtr
Definition: LuceneTypes.h:442
Lucene::TopDocsPtr
boost::shared_ptr< TopDocs > TopDocsPtr
Definition: LuceneTypes.h:471
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene
Definition: AbstractAllTermDocs.h:12
Collector.h
Lucene::MultiSearcher::_maxDoc
int32_t _maxDoc
Definition: MultiSearcher.h:31
Lucene::Collection< SearchablePtr >
Lucene::MultiSearcher
Implements search over a set of Searchables.
Definition: MultiSearcher.h:19
Lucene::TopFieldDocsPtr
boost::shared_ptr< TopFieldDocs > TopFieldDocsPtr
Definition: LuceneTypes.h:474
Lucene::FilterPtr
boost::shared_ptr< Filter > FilterPtr
Definition: LuceneTypes.h:358

clucene.sourceforge.net