Lucene++ - a full-featured, c++ search engine
API Documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
include
lucene++
TermDocs.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 TERMDOCS_H
8
#define TERMDOCS_H
9
10
#include "
LuceneObject.h
"
11
12
namespace
Lucene
{
13
19
class
LPPAPI
TermDocs
{
20
protected
:
21
TermDocs
();
22
23
public
:
24
LUCENE_INTERFACE
(
TermDocs
);
25
26
public
:
28
virtual
void
seek
(
const
TermPtr
& term) = 0;
29
32
virtual
void
seek
(
const
TermEnumPtr
& termEnum) = 0;
33
35
virtual
int32_t
doc
() = 0;
36
39
virtual
int32_t
freq
() = 0;
40
42
virtual
bool
next
() = 0;
43
47
virtual
int32_t
read
(
Collection<int32_t>
& docs,
Collection<int32_t>
& freqs) = 0;
48
51
virtual
bool
skipTo
(int32_t target) = 0;
52
54
virtual
void
close
() = 0;
55
};
56
57
}
58
59
#endif
LuceneObject.h
LUCENE_INTERFACE
#define LUCENE_INTERFACE(Name)
Definition
LuceneObject.h:19
Lucene::Collection
Utility template class to handle collections that can be safely copied and shared.
Definition
Collection.h:17
Lucene::TermDocs::skipTo
virtual bool skipTo(int32_t target)=0
Skips entries to the first beyond the current whose document number is greater than or equal to targe...
Lucene::TermDocs::doc
virtual int32_t doc()=0
Returns the current document number. This is invalid until next() is called for the first time.
Lucene::TermDocs::next
virtual bool next()=0
Moves to the next pair in the enumeration. Returns true if there is such a next pair in the enumerati...
Lucene::TermDocs::read
virtual int32_t read(Collection< int32_t > &docs, Collection< int32_t > &freqs)=0
Attempts to read multiple entries from the enumeration, up to length of docs. Document numbers are st...
Lucene::TermDocs::seek
virtual void seek(const TermEnumPtr &termEnum)=0
Sets this to the data for the current term in a TermEnum. This may be optimized in some implementatio...
Lucene::TermDocs::seek
virtual void seek(const TermPtr &term)=0
Sets this to the data for a term. The enumeration is reset to the start of the data for this term.
Lucene::TermDocs::freq
virtual int32_t freq()=0
Returns the frequency of the term within the current document. This is invalid until next() is called...
Lucene::TermDocs::close
virtual void close()=0
Frees associated resources.
Lucene::TermDocs::TermDocs
TermDocs()
Lucene
Definition
AbstractAllTermDocs.h:12
Lucene::TermEnumPtr
boost::shared_ptr< TermEnum > TermEnumPtr
Definition
LuceneTypes.h:235
Lucene::TermPtr
boost::shared_ptr< Term > TermPtr
Definition
LuceneTypes.h:233
clucene.sourceforge.net