Lucene++ - a full-featured, c++ search engine
API Documentation


Loading...
Searching...
No Matches
TermPositions.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 TERMPOSITIONS_H
8#define TERMPOSITIONS_H
9
10#include "TermDocs.h"
11
12namespace Lucene {
13
18class LPPAPI TermPositions : public TermDocs {
19protected:
21
22public:
23 virtual ~TermPositions();
25
26public:
29 // the first time.
30 virtual int32_t nextPosition();
31
35 virtual int32_t getPayloadLength();
36
45 virtual ByteArray getPayload(ByteArray data, int32_t offset);
46
50 virtual bool isPayloadAvailable();
51};
52
53}
54
55#endif
#define LUCENE_INTERFACE(Name)
Definition LuceneObject.h:19
TermDocs provides an interface for enumerating <document, frequency>; pairs for a term....
Definition TermDocs.h:19
TermPositions provides an interface for enumerating the <document, frequency, <position>*> tuples for...
Definition TermPositions.h:18
virtual int32_t getPayloadLength()
Returns the length of the payload at the current term position. This is invalid until nextPosition() ...
virtual ByteArray getPayload(ByteArray data, int32_t offset)
Returns the payload data at the current term position. This is invalid until nextPosition() is called...
virtual bool isPayloadAvailable()
Checks if a payload can be loaded at this position. Payloads can only be loaded once per call to next...
virtual int32_t nextPosition()
Returns next position in the current document. It is an error to call this more than freq() times wit...
Definition AbstractAllTermDocs.h:12

clucene.sourceforge.net