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
NearSpansOrdered.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 NEARSPANSORDERED_H
8
#define NEARSPANSORDERED_H
9
10
#include "
Spans.h
"
11
12
namespace
Lucene
13
{
31
class
LPPAPI
NearSpansOrdered
:
public
Spans
32
{
33
public
:
34
NearSpansOrdered
(
SpanNearQueryPtr
spanNearQuery,
IndexReaderPtr
reader,
bool
collectPayloads =
true
);
35
virtual
~
NearSpansOrdered
();
36
37
LUCENE_CLASS
(
NearSpansOrdered
);
38
39
protected
:
40
int32_t allowedSlop;
41
bool
firstTime
;
42
bool
more
;
43
45
Collection<SpansPtr>
subSpans
;
46
48
bool
inSameDoc
;
49
50
int32_t
matchDoc
;
51
int32_t
matchStart
;
52
int32_t
matchEnd
;
53
Collection<ByteArray>
matchPayload
;
54
55
Collection<SpansPtr>
subSpansByDoc
;
56
SpanNearQueryPtr
query
;
57
bool
collectPayloads
;
58
59
public
:
60
virtual
int32_t doc();
61
virtual
int32_t start();
62
virtual
int32_t end();
63
64
Collection<SpansPtr>
getSubSpans();
65
66
virtual
Collection<ByteArray>
getPayload();
67
virtual
bool
isPayloadAvailable();
68
virtual
bool
next();
69
virtual
bool
skipTo(int32_t target);
70
74
static
bool
docSpansOrdered(
SpansPtr
spans1,
SpansPtr
spans2);
75
76
virtual
String toString();
77
78
protected
:
82
bool
advanceAfterOrdered();
83
85
bool
toSameDoc();
86
87
// Like {@link #docSpansOrdered(SpansPtr, SpansPtr)}, but use the spans starts and ends as parameters.
88
static
bool
docSpansOrdered(int32_t start1, int32_t end1, int32_t start2, int32_t end2);
89
91
bool
stretchToOrder();
92
95
bool
shrinkToAfterShortestMatch();
96
};
97
}
98
99
#endif
clucene.sourceforge.net