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

WildcardQuery.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 WILDCARDQUERY_H
8 #define WILDCARDQUERY_H
9
10 #include "MultiTermQuery.h"
11
12 namespace Lucene {
13
21 class LPPAPI WildcardQuery : public MultiTermQuery {
22 public:
23 WildcardQuery(const TermPtr& term);
24 virtual ~WildcardQuery();
25
26 LUCENE_CLASS(WildcardQuery);
27
28 protected:
29 bool termContainsWildcard;
30 bool termIsPrefix;
31 TermPtr term;
32
33 public:
34 using MultiTermQuery::toString;
35
37 TermPtr getTerm();
38
39 virtual QueryPtr rewrite(const IndexReaderPtr& reader);
40
42 virtual String toString(const String& field);
43
44 virtual LuceneObjectPtr clone(const LuceneObjectPtr& other = LuceneObjectPtr());
45 virtual int32_t hashCode();
46 virtual bool equals(const LuceneObjectPtr& other);
47
48 protected:
49 virtual FilteredTermEnumPtr getEnum(const IndexReaderPtr& reader);
50 };
51
52 }
53
54 #endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene::TermPtr
boost::shared_ptr< Term > TermPtr
Definition: LuceneTypes.h:233
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
Lucene::QueryPtr
boost::shared_ptr< Query > QueryPtr
Definition: LuceneTypes.h:420
Lucene::WildcardQuery::termContainsWildcard
bool termContainsWildcard
Definition: WildcardQuery.h:26
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::WildcardQuery::termIsPrefix
bool termIsPrefix
Definition: WildcardQuery.h:30
Lucene::IndexReaderPtr
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition: LuceneTypes.h:157
Lucene::WildcardQuery
Implements the wildcard search query. Supported wildcards are *, which matches any character sequence...
Definition: WildcardQuery.h:21
Lucene::WildcardQuery::term
TermPtr term
Definition: WildcardQuery.h:31
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