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

Loading...
Searching...
No Matches
PrefixQuery.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 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
25 LUCENE_CLASS(PrefixQuery);
26
27 protected:
28 TermPtr prefix;
29
30 public:
31 using MultiTermQuery::toString;
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
MultiTermQuery.h
Lucene::LuceneObject::toString
virtual String toString()
Returns a string representation of the object.
Lucene::MultiTermQuery::MultiTermQuery
MultiTermQuery()
Lucene::PrefixQuery::getEnum
virtual FilteredTermEnumPtr getEnum(const IndexReaderPtr &reader)
Construct the enumeration to be used, expanding the pattern term.
Lucene::PrefixQuery::hashCode
virtual int32_t hashCode()
Return hash code for this object.
Lucene::PrefixQuery::equals
virtual bool equals(const LuceneObjectPtr &other)
Return whether two objects are equal.
Lucene::PrefixQuery::~PrefixQuery
virtual ~PrefixQuery()
Lucene::PrefixQuery::clone
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Returns a clone of this query.
Lucene::PrefixQuery::getPrefix
TermPtr getPrefix()
Returns the prefix of this query.
Lucene::PrefixQuery::toString
virtual String toString(const String &field)
Prints a user-readable version of this query.
Lucene::PrefixQuery::prefix
TermPtr prefix
Definition PrefixQuery.h:28
Lucene::PrefixQuery::PrefixQuery
PrefixQuery(const TermPtr &prefix)
Constructs a query for terms starting with prefix.
Lucene
Definition AbstractAllTermDocs.h:12
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