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
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 FUZZYQUERY_H
8
#define FUZZYQUERY_H
9
10
#include "
MultiTermQuery.h
"
11
12
namespace
Lucene {
13
19
class
LPPAPI
FuzzyQuery
:
public
MultiTermQuery
{
20
public
:
29
FuzzyQuery
(
const
TermPtr
& term,
double
minimumSimilarity, int32_t prefixLength);
30
FuzzyQuery
(
const
TermPtr
& term,
double
minimumSimilarity);
31
FuzzyQuery
(
const
TermPtr
& term);
32
33
virtual
~
FuzzyQuery
();
34
35
LUCENE_CLASS
(
FuzzyQuery
);
36
37
protected
:
38
double
minimumSimilarity;
39
int32_t
prefixLength
;
40
bool
termLongEnough
;
41
42
TermPtr
term
;
43
44
public
:
45
static
double
defaultMinSimilarity();
46
static
const
int32_t
defaultPrefixLength
;
47
48
public
:
49
using
MultiTermQuery::toString
;
50
53
double
getMinSimilarity();
54
57
int32_t getPrefixLength();
58
60
TermPtr
getTerm();
61
62
virtual
void
setRewriteMethod(
const
RewriteMethodPtr
& method);
63
virtual
QueryPtr
rewrite(
const
IndexReaderPtr
& reader);
64
65
virtual
LuceneObjectPtr
clone(
const
LuceneObjectPtr
& other =
LuceneObjectPtr
());
66
virtual
String toString(
const
String& field);
67
virtual
int32_t hashCode();
68
virtual
bool
equals(
const
LuceneObjectPtr
& other);
69
70
protected
:
71
void
ConstructQuery(
const
TermPtr
& term,
double
minimumSimilarity, int32_t prefixLength);
72
73
virtual
FilteredTermEnumPtr
getEnum(
const
IndexReaderPtr
& reader);
74
};
75
76
}
77
78
#endif
clucene.sourceforge.net