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

Loading...
Searching...
No Matches
TermVectorEntry.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 TERMVECTORENTRY_H
8#define TERMVECTORENTRY_H
9
10#include "LuceneObject.h"
11
12 namespace Lucene {
13
15 class LPPAPI TermVectorEntry : public LuceneObject {
16 public:
17 TermVectorEntry(const String& field = EmptyString, const String& term = EmptyString, int32_t frequency = 0,
18 Collection<TermVectorOffsetInfoPtr> offsets = Collection<TermVectorOffsetInfoPtr>(),
19 Collection<int32_t> positions = Collection<int32_t>());
20 virtual ~TermVectorEntry();
21
22 LUCENE_CLASS(TermVectorEntry);
23
24 protected:
25 String field;
26 String term;
27 int32_t frequency;
28 Collection<TermVectorOffsetInfoPtr> offsets;
29 Collection<int32_t> positions;
30
31 public:
32 String getField();
33 int32_t getFrequency();
34 Collection<TermVectorOffsetInfoPtr> getOffsets();
35 Collection<int32_t> getPositions();
36 String getTerm();
37
38 void setFrequency(int32_t frequency);
39 void setOffsets(Collection<TermVectorOffsetInfoPtr> offsets);
40 void setPositions(Collection<int32_t> positions);
41
42 virtual bool equals(const LuceneObjectPtr& other);
43 virtual int32_t hashCode();
44 virtual String toString();
45};
46
47}
48
49#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::TermVectorEntry
Convenience class for holding TermVector information.
Definition TermVectorEntry.h:15
Lucene::TermVectorEntry::setOffsets
void setOffsets(Collection< TermVectorOffsetInfoPtr > offsets)
Lucene::TermVectorEntry::getPositions
Collection< int32_t > getPositions()
Lucene::TermVectorEntry::~TermVectorEntry
virtual ~TermVectorEntry()
Lucene::TermVectorEntry::toString
virtual String toString()
Returns a string representation of the object.
Lucene::TermVectorEntry::equals
virtual bool equals(const LuceneObjectPtr &other)
Return whether two objects are equal.
Lucene::TermVectorEntry::hashCode
virtual int32_t hashCode()
Return hash code for this object.
Lucene::TermVectorEntry::setPositions
void setPositions(Collection< int32_t > positions)
Lucene::TermVectorEntry::getField
String getField()
Lucene::TermVectorEntry::getTerm
String getTerm()
Lucene::TermVectorEntry::offsets
Collection< TermVectorOffsetInfoPtr > offsets
Definition TermVectorEntry.h:28
Lucene::TermVectorEntry::term
String term
Definition TermVectorEntry.h:26
Lucene::TermVectorEntry::TermVectorEntry
TermVectorEntry(const String &field=EmptyString, const String &term=EmptyString, int32_t frequency=0, Collection< TermVectorOffsetInfoPtr > offsets=Collection< TermVectorOffsetInfoPtr >(), Collection< int32_t > positions=Collection< int32_t >())
Lucene::TermVectorEntry::frequency
int32_t frequency
Definition TermVectorEntry.h:27
Lucene::TermVectorEntry::getFrequency
int32_t getFrequency()
Lucene::TermVectorEntry::positions
Collection< int32_t > positions
Definition TermVectorEntry.h:29
Lucene::TermVectorEntry::getOffsets
Collection< TermVectorOffsetInfoPtr > getOffsets()
Lucene::TermVectorEntry::setFrequency
void setFrequency(int32_t frequency)
Lucene::TermVectorEntry::field
String field
Definition TermVectorEntry.h:25
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition LuceneTypes.h:539

clucene.sourceforge.net