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


PrefixQuery.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 PREFIXQUERY_H
8 #define PREFIXQUERY_H
9 
10 #include "MultiTermQuery.h"
11 
12 namespace Lucene {
13 
18 class LPPAPI PrefixQuery : public MultiTermQuery {
19 public:
21  PrefixQuery(const TermPtr& prefix);
22 
23  virtual ~PrefixQuery();
24 
26 
27 protected:
28  TermPtr prefix;
29 
30 public:
32 
34  TermPtr getPrefix();
35 
37  virtual String toString(const String& field);
38 
39  virtual LuceneObjectPtr clone(const LuceneObjectPtr& other = LuceneObjectPtr());
40  virtual int32_t hashCode();
41  virtual bool equals(const LuceneObjectPtr& other);
42 
43 protected:
44  virtual FilteredTermEnumPtr getEnum(const IndexReaderPtr& reader);
45 };
46 
47 }
48 
49 #endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene::TermPtr
boost::shared_ptr< Term > TermPtr
Definition: LuceneTypes.h:233
Lucene::PrefixQuery
A Query that matches documents containing terms with a specified prefix. A PrefixQuery is built by Qu...
Definition: PrefixQuery.h:18
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::IndexReaderPtr
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition: LuceneTypes.h:157
Lucene::MultiTermQuery
An abstract Query that matches documents containing a subset of terms provided by a {} enumeration.
Definition: MultiTermQuery.h:31
Lucene::Query::toString
virtual String toString()
Prints a query to a string.
MultiTermQuery.h
Lucene::FilteredTermEnumPtr
boost::shared_ptr< FilteredTermEnum > FilteredTermEnumPtr
Definition: LuceneTypes.h:365

clucene.sourceforge.net