Lucene++ - a full-featured, c++ search engine
API Documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
include
FuzzyQuery.h
Go to the documentation of this file.
1
// Copyright (c) 2009-2011 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 FUZZYQUERY_H
8
#define FUZZYQUERY_H
9
10
#include "
MultiTermQuery.h
"
11
12
namespace
Lucene
13
{
19
class
LPPAPI
FuzzyQuery
:
public
MultiTermQuery
20
{
21
public
:
30
FuzzyQuery
(
TermPtr
term,
double
minimumSimilarity, int32_t prefixLength);
31
FuzzyQuery
(
TermPtr
term,
double
minimumSimilarity);
32
FuzzyQuery
(
TermPtr
term);
33
34
virtual
~
FuzzyQuery
();
35
36
LUCENE_CLASS
(
FuzzyQuery
);
37
38
protected
:
39
double
minimumSimilarity;
40
int32_t
prefixLength
;
41
bool
termLongEnough
;
42
43
TermPtr
term
;
44
45
public
:
46
static
double
defaultMinSimilarity();
47
static
const
int32_t
defaultPrefixLength
;
48
49
public
:
50
using
MultiTermQuery::toString
;
51
54
double
getMinSimilarity();
55
58
int32_t getPrefixLength();
59
61
TermPtr
getTerm();
62
63
virtual
void
setRewriteMethod(
RewriteMethodPtr
method);
64
virtual
QueryPtr
rewrite(
IndexReaderPtr
reader);
65
66
virtual
LuceneObjectPtr
clone(
LuceneObjectPtr
other =
LuceneObjectPtr
());
67
virtual
String toString(
const
String& field);
68
virtual
int32_t hashCode();
69
virtual
bool
equals(
LuceneObjectPtr
other);
70
71
protected
:
72
void
ConstructQuery(
TermPtr
term,
double
minimumSimilarity, int32_t prefixLength);
73
74
virtual
FilteredTermEnumPtr
getEnum(
IndexReaderPtr
reader);
75
};
76
}
77
78
#endif
clucene.sourceforge.net