Lucene++ - a full-featured, c++ search engine
API Documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
include
lucene++
Spans.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 SPANS_H
8
#define SPANS_H
9
10
#include "
LuceneObject.h
"
11
12
namespace
Lucene
{
13
17
class
LPPAPI
Spans
:
public
LuceneObject
{
18
public
:
19
virtual
~Spans
();
20
LUCENE_CLASS
(
Spans
);
21
22
public
:
24
virtual
bool
next
() = 0;
25
44
virtual
bool
skipTo
(int32_t target) = 0;
45
47
virtual
int32_t
doc
() = 0;
48
50
virtual
int32_t
start
() = 0;
51
53
virtual
int32_t
end
() = 0;
54
66
virtual
Collection<ByteArray>
getPayload
() = 0;
67
73
virtual
bool
isPayloadAvailable
() = 0;
74
};
75
76
}
77
78
#endif
LuceneObject.h
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition
LuceneObject.h:24
Lucene::Collection
Utility template class to handle collections that can be safely copied and shared.
Definition
Collection.h:17
Lucene::LuceneObject::LuceneObject
LuceneObject()
Lucene::Spans
An enumeration of span matches. Used to implement span searching. Each span represents a range of ter...
Definition
Spans.h:17
Lucene::Spans::start
virtual int32_t start()=0
Returns the start position of the current match. Initially invalid.
Lucene::Spans::~Spans
virtual ~Spans()
Lucene::Spans::next
virtual bool next()=0
Move to the next match, returning true if any such exists.
Lucene::Spans::skipTo
virtual bool skipTo(int32_t target)=0
Skips to the first match beyond the current, whose document number is greater than or equal to target...
Lucene::Spans::end
virtual int32_t end()=0
Returns the end position of the current match. Initially invalid.
Lucene::Spans::doc
virtual int32_t doc()=0
Returns the document number of the current match. Initially invalid.
Lucene::Spans::getPayload
virtual Collection< ByteArray > getPayload()=0
Returns the payload data for the current span. This is invalid until next() is called for the first t...
Lucene::Spans::isPayloadAvailable
virtual bool isPayloadAvailable()=0
Checks if a payload can be loaded at this position.
Lucene
Definition
AbstractAllTermDocs.h:12
clucene.sourceforge.net