Lucene++ - a full-featured, c++ search engine
API Documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
include
lucene++
FreqProxTermsWriter.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 FREQPROXTERMSWRITER_H
8
#define FREQPROXTERMSWRITER_H
9
10
#include "
TermsHashConsumer.h
"
11
#include "
RawPostingList.h
"
12
13
namespace
Lucene
{
14
15
class
FreqProxTermsWriter
:
public
TermsHashConsumer
{
16
public
:
17
virtual
~FreqProxTermsWriter
();
18
19
LUCENE_CLASS
(
FreqProxTermsWriter
);
20
21
protected
:
22
ByteArray
payloadBuffer
;
23
24
public
:
25
virtual
TermsHashConsumerPerThreadPtr
addThread
(
const
TermsHashPerThreadPtr
& perThread);
26
virtual
void
createPostings
(
Collection<RawPostingListPtr>
postings, int32_t start, int32_t count);
27
virtual
void
closeDocStore
(
const
SegmentWriteStatePtr
& state);
28
virtual
void
abort
();
29
virtual
void
flush
(MapTermsHashConsumerPerThreadCollectionTermsHashConsumerPerField threadsAndFields,
const
SegmentWriteStatePtr
& state);
30
33
void
appendPostings
(
Collection<FreqProxTermsWriterPerFieldPtr>
fields,
const
FormatPostingsFieldsConsumerPtr
& consumer);
34
35
virtual
int32_t
bytesPerPosting
();
36
37
protected
:
38
static
int32_t
compareText
(
const
wchar_t
* text1, int32_t pos1,
const
wchar_t
* text2, int32_t pos2);
39
};
40
41
class
FreqProxTermsWriterPostingList
:
public
RawPostingList
{
42
public
:
43
FreqProxTermsWriterPostingList
();
44
virtual
~FreqProxTermsWriterPostingList
();
45
46
LUCENE_CLASS
(
FreqProxTermsWriterPostingList
);
47
48
public
:
49
int32_t
docFreq
;
// # times this term occurs in the current doc
50
int32_t
lastDocID
;
// Last docID where this term occurred
51
int32_t
lastDocCode
;
// Code for prior doc
52
int32_t
lastPosition
;
// Last position where this term occurred
53
};
54
55
}
56
57
#endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition
LuceneObject.h:24
RawPostingList.h
TermsHashConsumer.h
Lucene::Collection
Utility template class to handle collections that can be safely copied and shared.
Definition
Collection.h:17
Lucene::FreqProxTermsWriterPostingList::lastPosition
int32_t lastPosition
Definition
FreqProxTermsWriter.h:52
Lucene::FreqProxTermsWriterPostingList::lastDocID
int32_t lastDocID
Definition
FreqProxTermsWriter.h:50
Lucene::FreqProxTermsWriterPostingList::docFreq
int32_t docFreq
Definition
FreqProxTermsWriter.h:49
Lucene::FreqProxTermsWriterPostingList::~FreqProxTermsWriterPostingList
virtual ~FreqProxTermsWriterPostingList()
Lucene::FreqProxTermsWriterPostingList::FreqProxTermsWriterPostingList
FreqProxTermsWriterPostingList()
Lucene::FreqProxTermsWriterPostingList::lastDocCode
int32_t lastDocCode
Definition
FreqProxTermsWriter.h:51
Lucene::FreqProxTermsWriter
Definition
FreqProxTermsWriter.h:15
Lucene::FreqProxTermsWriter::payloadBuffer
ByteArray payloadBuffer
Definition
FreqProxTermsWriter.h:22
Lucene::FreqProxTermsWriter::addThread
virtual TermsHashConsumerPerThreadPtr addThread(const TermsHashPerThreadPtr &perThread)
Lucene::FreqProxTermsWriter::appendPostings
void appendPostings(Collection< FreqProxTermsWriterPerFieldPtr > fields, const FormatPostingsFieldsConsumerPtr &consumer)
Walk through all unique text tokens (Posting instances) found in this field and serialize them into a...
Lucene::FreqProxTermsWriter::closeDocStore
virtual void closeDocStore(const SegmentWriteStatePtr &state)
Lucene::FreqProxTermsWriter::abort
virtual void abort()
Lucene::FreqProxTermsWriter::~FreqProxTermsWriter
virtual ~FreqProxTermsWriter()
Lucene::FreqProxTermsWriter::bytesPerPosting
virtual int32_t bytesPerPosting()
Lucene::FreqProxTermsWriter::compareText
static int32_t compareText(const wchar_t *text1, int32_t pos1, const wchar_t *text2, int32_t pos2)
Lucene::FreqProxTermsWriter::createPostings
virtual void createPostings(Collection< RawPostingListPtr > postings, int32_t start, int32_t count)
Lucene::FreqProxTermsWriter::flush
virtual void flush(MapTermsHashConsumerPerThreadCollectionTermsHashConsumerPerField threadsAndFields, const SegmentWriteStatePtr &state)
Lucene::RawPostingList::RawPostingList
RawPostingList()
Lucene::TermsHashConsumer
Definition
TermsHashConsumer.h:14
Lucene
Definition
AbstractAllTermDocs.h:12
Lucene::SegmentWriteStatePtr
boost::shared_ptr< SegmentWriteState > SegmentWriteStatePtr
Definition
LuceneTypes.h:222
Lucene::TermsHashPerThreadPtr
boost::shared_ptr< TermsHashPerThread > TermsHashPerThreadPtr
Definition
LuceneTypes.h:251
Lucene::FormatPostingsFieldsConsumerPtr
boost::shared_ptr< FormatPostingsFieldsConsumer > FormatPostingsFieldsConsumerPtr
Definition
LuceneTypes.h:141
Lucene::TermsHashConsumerPerThreadPtr
boost::shared_ptr< TermsHashConsumerPerThread > TermsHashConsumerPerThreadPtr
Definition
LuceneTypes.h:249
clucene.sourceforge.net