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

Loading...
Searching...
No Matches
MultipleTermPositions.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 MULTIPLETERMPOSITIONS_H
8#define MULTIPLETERMPOSITIONS_H
9
10#include "TermPositions.h"
11
12 namespace Lucene {
13
16 class LPPAPI MultipleTermPositions : public TermPositions, public LuceneObject {
17 public:
18 MultipleTermPositions(const IndexReaderPtr& indexReader, Collection<TermPtr> terms);
19 virtual ~MultipleTermPositions();
20
21 LUCENE_CLASS(MultipleTermPositions);
22
23 protected:
24 int32_t _doc;
25 int32_t _freq;
26 TermPositionsQueuePtr termPositionsQueue;
27 IntQueuePtr posList;
28
29 public:
30 virtual bool next();
31 virtual int32_t nextPosition();
32 virtual bool skipTo(int32_t target);
33 virtual int32_t doc();
34 virtual int32_t freq();
35 virtual void close();
36
38 virtual void seek(const TermPtr& term);
39
41 virtual void seek(const TermEnumPtr& termEnum);
42
44 virtual int32_t read(Collection<int32_t>& docs, Collection<int32_t>& freqs);
45
47 virtual ByteArray getPayload(ByteArray data, int32_t offset);
48
50 virtual bool isPayloadAvailable();
51};
52
53}
54
55#endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
TermPositions.h
Lucene::Collection
Utility template class to handle collections that can be safely copied and shared.
Definition Collection.h:17
Lucene::LuceneObject
Base class for all Lucene classes.
Definition LuceneObject.h:31
Lucene::MultipleTermPositions
Allows you to iterate over the TermPositions for multiple Terms as a single TermPositions.
Definition MultipleTermPositions.h:16
Lucene::MultipleTermPositions::next
virtual bool next()
Moves to the next pair in the enumeration. Returns true if there is such a next pair in the enumerati...
Lucene::MultipleTermPositions::_doc
int32_t _doc
Definition MultipleTermPositions.h:24
Lucene::MultipleTermPositions::posList
IntQueuePtr posList
Definition MultipleTermPositions.h:27
Lucene::MultipleTermPositions::_freq
int32_t _freq
Definition MultipleTermPositions.h:25
Lucene::MultipleTermPositions::close
virtual void close()
Frees associated resources.
Lucene::MultipleTermPositions::seek
virtual void seek(const TermPtr &term)
Not implemented.
Lucene::MultipleTermPositions::freq
virtual int32_t freq()
Returns the frequency of the term within the current document. This is invalid until next() is called...
Lucene::MultipleTermPositions::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::MultipleTermPositions::isPayloadAvailable
virtual bool isPayloadAvailable()
Lucene::MultipleTermPositions::read
virtual int32_t read(Collection< int32_t > &docs, Collection< int32_t > &freqs)
Not implemented.
Lucene::MultipleTermPositions::MultipleTermPositions
MultipleTermPositions(const IndexReaderPtr &indexReader, Collection< TermPtr > terms)
Lucene::MultipleTermPositions::getPayload
virtual ByteArray getPayload(ByteArray data, int32_t offset)
Not implemented.
Lucene::MultipleTermPositions::termPositionsQueue
TermPositionsQueuePtr termPositionsQueue
Definition MultipleTermPositions.h:26
Lucene::MultipleTermPositions::skipTo
virtual bool skipTo(int32_t target)
Skips entries to the first beyond the current whose document number is greater than or equal to targe...
Lucene::MultipleTermPositions::~MultipleTermPositions
virtual ~MultipleTermPositions()
Lucene::MultipleTermPositions::doc
virtual int32_t doc()
Returns the current document number. This is invalid until next() is called for the first time.
Lucene::MultipleTermPositions::seek
virtual void seek(const TermEnumPtr &termEnum)
Not implemented.
Lucene::TermPositions
TermPositions provides an interface for enumerating the <document, frequency, <position>*> tuples for...
Definition TermPositions.h:18
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::TermPositionsQueuePtr
boost::shared_ptr< TermPositionsQueue > TermPositionsQueuePtr
Definition LuceneTypes.h:244
Lucene::TermPtr
boost::shared_ptr< Term > TermPtr
Definition LuceneTypes.h:233
Lucene::IntQueuePtr
boost::shared_ptr< IntQueue > IntQueuePtr
Definition LuceneTypes.h:162
Lucene::TermEnumPtr
boost::shared_ptr< TermEnum > TermEnumPtr
Definition LuceneTypes.h:235
Lucene::IndexReaderPtr
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition LuceneTypes.h:157

clucene.sourceforge.net