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
Searcher.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 SEARCHER_H
8 #define SEARCHER_H
9
10 #include "Searchable.h"
11
12 namespace Lucene
13 {
18 class LPPAPI Searcher : public Searchable, public LuceneObject
19 {
20 public:
21 Searcher();
22 virtual ~Searcher();
23
24 LUCENE_CLASS(Searcher);
25
26 protected:
28 SimilarityPtr similarity;
29
30 public:
36 virtual TopFieldDocsPtr search(QueryPtr query, FilterPtr filter, int32_t n, SortPtr sort);
37
48 virtual void search(QueryPtr query, CollectorPtr results);
49
62 virtual void search(QueryPtr query, FilterPtr filter, CollectorPtr results);
63
65 virtual TopDocsPtr search(QueryPtr query, FilterPtr filter, int32_t n);
66
68 virtual TopDocsPtr search(QueryPtr query, int32_t n);
69
75 virtual ExplanationPtr explain(QueryPtr query, int32_t doc);
76
78 virtual void setSimilarity(SimilarityPtr similarity);
79
83 virtual SimilarityPtr getSimilarity();
84
85 virtual Collection<int32_t> docFreqs(Collection<TermPtr> terms);
86
87 virtual void search(WeightPtr weight, FilterPtr filter, CollectorPtr results) = 0;
88 virtual void close() = 0;
89 virtual int32_t docFreq(TermPtr term) = 0;
90 virtual int32_t maxDoc() = 0;
91 virtual TopDocsPtr search(WeightPtr weight, FilterPtr filter, int32_t n) = 0;
92 virtual DocumentPtr doc(int32_t n) = 0;
93 virtual DocumentPtr doc(int32_t n, FieldSelectorPtr fieldSelector) = 0;
94 virtual QueryPtr rewrite(QueryPtr query) = 0;
95 virtual ExplanationPtr explain(WeightPtr weight, int32_t doc) = 0;
96 virtual TopFieldDocsPtr search(WeightPtr weight, FilterPtr filter, int32_t n, SortPtr sort) = 0;
97
98 protected:
101 virtual WeightPtr createWeight(QueryPtr query);
102 };
103 }
104
105 #endif

clucene.sourceforge.net