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

clucene.sourceforge.net