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

TermPositions.h
Go to the documentation of this file.
1 // 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
12 namespace Lucene {
13
18 class LPPAPI TermPositions : public TermDocs {
19 protected:
20 TermPositions();
21
22 public:
23 virtual ~TermPositions();
24 LUCENE_INTERFACE(TermPositions);
25
26 public:
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
LUCENE_INTERFACE
#define LUCENE_INTERFACE(Name)
Definition: LuceneObject.h:19
TermDocs.h
Lucene::TermDocs
TermDocs provides an interface for enumerating <document, frequency>; pairs for a term....
Definition: TermDocs.h:19
Lucene::TermPositions
TermPositions provides an interface for enumerating the <document, frequency, <position>*> tuples for...
Definition: TermPositions.h:18
Lucene::TermPositions::getPayloadLength
virtual int32_t getPayloadLength()
Returns the length of the payload at the current term position. This is invalid until {} is called fo...
Lucene::TermPositions::TermPositions
TermPositions()
Lucene::TermPositions::getPayload
virtual ByteArray getPayload(ByteArray data, int32_t offset)
Returns the payload data at the current term position. This is invalid until nextPosition() is called...
Lucene::TermPositions::isPayloadAvailable
virtual bool isPayloadAvailable()
Checks if a payload can be loaded at this position. Payloads can only be loaded once per call to next...
Lucene::TermPositions::nextPosition
virtual int32_t nextPosition()
Returns next position in the current document. It is an error to call this more than freq() times wit...
Lucene::TermPositions::~TermPositions
virtual ~TermPositions()
Lucene
Definition: AbstractAllTermDocs.h:12

clucene.sourceforge.net