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


Loading...
Searching...
No Matches
WildcardTermEnum.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 WILDCARDTERMENUM_H
8#define WILDCARDTERMENUM_H
9
10#include "FilteredTermEnum.h"
11
12namespace Lucene {
13
18class LPPAPI WildcardTermEnum : public FilteredTermEnum {
19public:
24 WildcardTermEnum(const IndexReaderPtr& reader, const TermPtr& term);
25
27
29
30public:
31 static const wchar_t WILDCARD_STRING;
32 static const wchar_t WILDCARD_CHAR;
33
35 String field;
36 String text;
37 String pre;
38 int32_t preLen;
40
41public:
42 virtual double difference();
43
45 static bool wildcardEquals(const String& pattern, int32_t patternIdx, const String& string, int32_t stringIdx);
46
47protected:
48 virtual bool termCompare(const TermPtr& term);
49 virtual bool endEnum();
50};
51
52}
53
54#endif
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Abstract class for enumerating a subset of all terms.
Definition FilteredTermEnum.h:18
Subclass of FilteredTermEnum for enumerating all terms that match the specified wildcard filter term.
Definition WildcardTermEnum.h:18
WildcardTermEnum(const IndexReaderPtr &reader, const TermPtr &term)
Creates a new WildcardTermEnum.
bool _endEnum
Definition WildcardTermEnum.h:39
static const wchar_t WILDCARD_STRING
Definition WildcardTermEnum.h:31
static const wchar_t WILDCARD_CHAR
Definition WildcardTermEnum.h:32
virtual bool endEnum()
Indicates the end of the enumeration has been reached.
virtual double difference()
Equality measure on the term.
int32_t preLen
Definition WildcardTermEnum.h:38
String text
Definition WildcardTermEnum.h:36
static bool wildcardEquals(const String &pattern, int32_t patternIdx, const String &string, int32_t stringIdx)
Determines if a word matches a wildcard pattern.
virtual bool termCompare(const TermPtr &term)
Equality compare on the term.
String field
Definition WildcardTermEnum.h:35
TermPtr searchTerm
Definition WildcardTermEnum.h:34
String pre
Definition WildcardTermEnum.h:37
Definition AbstractAllTermDocs.h:12
boost::shared_ptr< Term > TermPtr
Definition LuceneTypes.h:233
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition LuceneTypes.h:157

clucene.sourceforge.net