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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TermQuery.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 TERMQUERY_H
8 #define TERMQUERY_H
9 
10 #include "Query.h"
11 
12 namespace Lucene {
13 
16 class LPPAPI TermQuery : public Query {
17 public:
19  TermQuery(const TermPtr& term);
20 
21  virtual ~TermQuery();
22 
24 
25 protected:
26  TermPtr term;
27 
28 public:
29  using Query::toString;
30 
32  TermPtr getTerm();
33 
34  virtual WeightPtr createWeight(const SearcherPtr& searcher);
35  virtual void extractTerms(SetTerm terms);
36 
38  virtual String toString(const String& field);
39 
40  virtual bool equals(const LuceneObjectPtr& other);
41  virtual int32_t hashCode();
42  virtual LuceneObjectPtr clone(const LuceneObjectPtr& other = LuceneObjectPtr());
43 
44  friend class TermWeight;
45 };
46 
47 }
48 
49 #endif
virtual String toString()
Prints a query to a string.
boost::shared_ptr< Term > TermPtr
Definition: LuceneTypes.h:233
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
boost::shared_ptr< Weight > WeightPtr
Definition: LuceneTypes.h:480
boost::shared_ptr< Searcher > SearcherPtr
Definition: LuceneTypes.h:434
The abstract base class for queries.
Definition: Query.h:31
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Definition: AbstractAllTermDocs.h:12
A Query that matches documents containing a term. This may be combined with other terms with a Boolea...
Definition: TermQuery.h:16
TermPtr term
Definition: TermQuery.h:23

clucene.sourceforge.net