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
12namespace Lucene {
13
18class LPPAPI PrefixQuery : public MultiTermQuery {
19public:
21 PrefixQuery(const TermPtr& prefix);
22
23 virtual ~PrefixQuery();
24
26
27protected:
29
30public:
31 using MultiTermQuery::toString;
32
35
37 virtual String toString(const String& field);
38
40 virtual int32_t hashCode();
41 virtual bool equals(const LuceneObjectPtr& other);
42
43protected:
45};
46
47}
48
49#endif
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
An abstract Query that matches documents containing a subset of terms provided by a FilteredTermEnum ...
Definition MultiTermQuery.h:31
A Query that matches documents containing terms with a specified prefix. A PrefixQuery is built by Qu...
Definition PrefixQuery.h:18
virtual FilteredTermEnumPtr getEnum(const IndexReaderPtr &reader)
Construct the enumeration to be used, expanding the pattern term.
virtual int32_t hashCode()
Return hash code for this object.
virtual bool equals(const LuceneObjectPtr &other)
Return whether two objects are equal.
virtual ~PrefixQuery()
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Returns a clone of this query.
TermPtr getPrefix()
Returns the prefix of this query.
virtual String toString(const String &field)
Prints a user-readable version of this query.
TermPtr prefix
Definition PrefixQuery.h:28
PrefixQuery(const TermPtr &prefix)
Constructs a query for terms starting with prefix.
Definition AbstractAllTermDocs.h:12
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition LuceneTypes.h:539
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