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

Loading...
Searching...
No Matches
WildcardQuery.h
Go to the documentation of this file.
1
2// 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
MultiTermQuery.h
Lucene::LuceneObject::toString
virtual String toString()
Returns a string representation of the object.
Lucene::MultiTermQuery::MultiTermQuery
MultiTermQuery()
Lucene::WildcardQuery::clone
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Returns a clone of this query.
Lucene::WildcardQuery::getEnum
virtual FilteredTermEnumPtr getEnum(const IndexReaderPtr &reader)
Construct the enumeration to be used, expanding the pattern term.
Lucene::WildcardQuery::~WildcardQuery
virtual ~WildcardQuery()
Lucene::WildcardQuery::toString
virtual String toString(const String &field)
Prints a user-readable version of this query.
Lucene::WildcardQuery::WildcardQuery
WildcardQuery(const TermPtr &term)
Lucene::WildcardQuery::rewrite
virtual QueryPtr rewrite(const IndexReaderPtr &reader)
Called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into ...
Lucene::WildcardQuery::term
TermPtr term
Definition WildcardQuery.h:31
Lucene::WildcardQuery::termContainsWildcard
bool termContainsWildcard
Definition WildcardQuery.h:29
Lucene::WildcardQuery::equals
virtual bool equals(const LuceneObjectPtr &other)
Return whether two objects are equal.
Lucene::WildcardQuery::termIsPrefix
bool termIsPrefix
Definition WildcardQuery.h:30
Lucene::WildcardQuery::getTerm
TermPtr getTerm()
Returns the pattern term.
Lucene::WildcardQuery::hashCode
virtual int32_t hashCode()
Return hash code for this object.
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::QueryPtr
boost::shared_ptr< Query > QueryPtr
Definition LuceneTypes.h:420
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition LuceneTypes.h:539
Lucene::TermPtr
boost::shared_ptr< Term > TermPtr
Definition LuceneTypes.h:233
Lucene::FilteredTermEnumPtr
boost::shared_ptr< FilteredTermEnum > FilteredTermEnumPtr
Definition LuceneTypes.h:365
Lucene::IndexReaderPtr
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition LuceneTypes.h:157

clucene.sourceforge.net