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

Loading...
Searching...
No Matches
FieldSortedTermVectorMapper.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 FIELDSORTEDTERMVECTORMAPPER_H
8#define FIELDSORTEDTERMVECTORMAPPER_H
9
10#include <boost/function.hpp>
11#include "TermVectorMapper.h"
12
13 namespace Lucene {
14
17 class LPPAPI FieldSortedTermVectorMapper : public TermVectorMapper {
18 public:
20 FieldSortedTermVectorMapper(TermVectorEntryComparator comparator);
21
22 FieldSortedTermVectorMapper(bool ignoringPositions, bool ignoringOffsets, TermVectorEntryComparator comparator);
23
24 virtual ~FieldSortedTermVectorMapper();
25
26 LUCENE_CLASS(FieldSortedTermVectorMapper);
27
28 protected:
29 MapStringCollectionTermVectorEntry fieldToTerms;
30 Collection<TermVectorEntryPtr> currentSet;
31 String currentField;
32 TermVectorEntryComparator comparator;
33
34 public:
36 virtual void map(const String& term, int32_t frequency, Collection<TermVectorOffsetInfoPtr> offsets, Collection<int32_t> positions);
37
39 virtual void setExpectations(const String& field, int32_t numTerms, bool storeOffsets, bool storePositions);
40
44 MapStringCollectionTermVectorEntry getFieldToTerms();
45
46 TermVectorEntryComparator getComparator();
47};
48
49}
50
51#endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
TermVectorMapper.h
Lucene::Collection
Utility template class to handle collections that can be safely copied and shared.
Definition Collection.h:17
Lucene::FieldSortedTermVectorMapper
For each Field, store a sorted collection of TermVectorEntrys This is not thread-safe.
Definition FieldSortedTermVectorMapper.h:17
Lucene::FieldSortedTermVectorMapper::fieldToTerms
MapStringCollectionTermVectorEntry fieldToTerms
Definition FieldSortedTermVectorMapper.h:29
Lucene::FieldSortedTermVectorMapper::setExpectations
virtual void setExpectations(const String &field, int32_t numTerms, bool storeOffsets, bool storePositions)
Tell the mapper what to expect in regards to field, number of terms, offset and position storage.
Lucene::FieldSortedTermVectorMapper::comparator
TermVectorEntryComparator comparator
Definition FieldSortedTermVectorMapper.h:32
Lucene::FieldSortedTermVectorMapper::currentField
String currentField
Definition FieldSortedTermVectorMapper.h:31
Lucene::FieldSortedTermVectorMapper::map
virtual void map(const String &term, int32_t frequency, Collection< TermVectorOffsetInfoPtr > offsets, Collection< int32_t > positions)
Map the Term Vector information into your own structure.
Lucene::FieldSortedTermVectorMapper::currentSet
Collection< TermVectorEntryPtr > currentSet
Definition FieldSortedTermVectorMapper.h:30
Lucene::FieldSortedTermVectorMapper::~FieldSortedTermVectorMapper
virtual ~FieldSortedTermVectorMapper()
Lucene::FieldSortedTermVectorMapper::getComparator
TermVectorEntryComparator getComparator()
Lucene::FieldSortedTermVectorMapper::FieldSortedTermVectorMapper
FieldSortedTermVectorMapper(TermVectorEntryComparator comparator)
Lucene::FieldSortedTermVectorMapper::FieldSortedTermVectorMapper
FieldSortedTermVectorMapper(bool ignoringPositions, bool ignoringOffsets, TermVectorEntryComparator comparator)
Lucene::FieldSortedTermVectorMapper::getFieldToTerms
MapStringCollectionTermVectorEntry getFieldToTerms()
Get the mapping between fields and terms, sorted by the comparator.
Lucene::TermVectorMapper
The TermVectorMapper can be used to map Term Vectors into your own structure instead of the parallel ...
Definition TermVectorMapper.h:18
Lucene
Definition AbstractAllTermDocs.h:12

clucene.sourceforge.net