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

Loading...
Searching...
No Matches
TermVectorMapper.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 TERMVECTORMAPPER_H
8#define TERMVECTORMAPPER_H
9
10#include "LuceneObject.h"
11
12 namespace Lucene {
13
18 class LPPAPI TermVectorMapper : public LuceneObject {
19 public:
23 TermVectorMapper(bool ignoringPositions = false, bool ignoringOffsets = false);
24
25 virtual ~TermVectorMapper();
26
27 LUCENE_CLASS(TermVectorMapper);
28
29 protected:
30 bool ignoringPositions;
31 bool ignoringOffsets;
32
33 public:
42 virtual void setExpectations(const String& field, int32_t numTerms, bool storeOffsets, bool storePositions) = 0;
43
49 virtual void map(const String& term, int32_t frequency, Collection<TermVectorOffsetInfoPtr> offsets, Collection<int32_t> positions) = 0;
50
54 virtual bool isIgnoringPositions();
55
57 virtual bool isIgnoringOffsets();
58
68 virtual void setDocumentNumber(int32_t documentNumber);
69};
70
71}
72
73#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
Base class for all Lucene classes.
Definition LuceneObject.h:31
Lucene::TermVectorMapper
The TermVectorMapper can be used to map Term Vectors into your own structure instead of the parallel ...
Definition TermVectorMapper.h:18
Lucene::TermVectorMapper::isIgnoringPositions
virtual bool isIgnoringPositions()
Indicate to Lucene that even if there are positions stored, this mapper is not interested in them and...
Lucene::TermVectorMapper::ignoringOffsets
bool ignoringOffsets
Definition TermVectorMapper.h:31
Lucene::TermVectorMapper::TermVectorMapper
TermVectorMapper(bool ignoringPositions=false, bool ignoringOffsets=false)
Lucene::TermVectorMapper::~TermVectorMapper
virtual ~TermVectorMapper()
Lucene::TermVectorMapper::setExpectations
virtual void setExpectations(const String &field, int32_t numTerms, bool storeOffsets, bool storePositions)=0
Tell the mapper what to expect in regards to field, number of terms, offset and position storage....
Lucene::TermVectorMapper::setDocumentNumber
virtual void setDocumentNumber(int32_t documentNumber)
Passes down the index of the document whose term vector is currently being mapped,...
Lucene::TermVectorMapper::ignoringPositions
bool ignoringPositions
Definition TermVectorMapper.h:30
Lucene::TermVectorMapper::map
virtual void map(const String &term, int32_t frequency, Collection< TermVectorOffsetInfoPtr > offsets, Collection< int32_t > positions)=0
Map the Term Vector information into your own structure.
Lucene::TermVectorMapper::isIgnoringOffsets
virtual bool isIgnoringOffsets()
Lucene
Definition AbstractAllTermDocs.h:12

clucene.sourceforge.net