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 
27 
28 protected:
32 
33 public:
35 
38 
39  virtual QueryPtr rewrite(const IndexReaderPtr& reader);
40 
42  virtual String toString(const String& field);
43 
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
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
An abstract Query that matches documents containing a subset of terms provided by a {} enumeration.
Definition: MultiTermQuery.h:31
virtual String toString()
Prints a query to a string.
Implements the wildcard search query. Supported wildcards are *, which matches any character sequence...
Definition: WildcardQuery.h:21
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Returns a clone of this query.
virtual FilteredTermEnumPtr getEnum(const IndexReaderPtr &reader)
Construct the enumeration to be used, expanding the pattern term.
virtual String toString(const String &field)
Prints a user-readable version of this query.
WildcardQuery(const TermPtr &term)
virtual QueryPtr rewrite(const IndexReaderPtr &reader)
Called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into ...
TermPtr term
Definition: WildcardQuery.h:31
bool termContainsWildcard
Definition: WildcardQuery.h:26
virtual bool equals(const LuceneObjectPtr &other)
Return whether two objects are equal.
bool termIsPrefix
Definition: WildcardQuery.h:30
TermPtr getTerm()
Returns the pattern term.
virtual int32_t hashCode()
Return hash code for this object.
Definition: AbstractAllTermDocs.h:12
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
boost::shared_ptr< Query > QueryPtr
Definition: LuceneTypes.h:420
boost::shared_ptr< Term > TermPtr
Definition: LuceneTypes.h:233
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition: LuceneTypes.h:157
boost::shared_ptr< FilteredTermEnum > FilteredTermEnumPtr
Definition: LuceneTypes.h:365

clucene.sourceforge.net