This project has retired. For details please refer to its Attic page.
Lucy::Index::PostingList – C API Documentation
Apache Lucy™

Lucy::Index::PostingList

parcel Lucy
class variable LUCY_POSTINGLIST
struct symbol lucy_PostingList
class nickname lucy_PList
header file Lucy/Index/PostingList.h

Name

Lucy::Index::PostingList – Term-Document pairings.

Description

PostingList is an iterator which supplies a list of document ids that match a given term.

See IRTheory for definitions of “posting” and “posting list”.

Methods

Get_Doc_Freq (abstract)
uint32_t
lucy_PList_Get_Doc_Freq(
    lucy_PostingList *self
);

Return the number of documents that the PostingList contains. (This number will include any documents which have been marked as deleted but not yet purged.)

Seek (abstract)
void
lucy_PList_Seek(
    lucy_PostingList *self,
    cfish_Obj *target
);

Prepare the PostingList object to iterate over matches for documents that match target.

target

The term to match. If NULL, the iterator will be empty.

Methods inherited from Lucy::Search::Matcher

Next (abstract)
int32_t
lucy_PList_Next(
    lucy_PostingList *self
);

Proceed to the next doc id.

Returns: A positive doc id, or 0 once the iterator is exhausted.

Advance
int32_t
lucy_PList_Advance(
    lucy_PostingList *self,
    int32_t target
);

Advance the iterator to the first doc id greater than or equal to target. The default implementation simply calls Next() over and over, but subclasses have the option of doing something more efficient.

target

A positive doc id, which must be greater than the current doc id once the iterator has been initialized.

Returns: A positive doc id, or 0 once the iterator is exhausted.

Get_Doc_ID (abstract)
int32_t
lucy_PList_Get_Doc_ID(
    lucy_PostingList *self
);

Return the current doc id. Valid only after a successful call to Next() or Advance() and must not be called otherwise.

Score (abstract)
float
lucy_PList_Score(
    lucy_PostingList *self
);

Return the score of the current document.

Only Matchers which are used for scored search need implement Score().

Inheritance

Lucy::Index::PostingList is a Lucy::Search::Matcher is a Clownfish::Obj.