parcel | Lucy |
class variable | LUCY_POSTINGLIST |
struct symbol | lucy_PostingList |
class nickname | lucy_PList |
header file | Lucy/Index/PostingList.h |
Lucy::Index::PostingList – Term-Document pairings.
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”.
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.)
void
lucy_PList_Seek(
lucy_PostingList *self,
cfish_Obj *target
);
Prepare the PostingList object to iterate over matches for documents
that match target
.
The term to match. If NULL, the iterator will be empty.
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.
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.
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.
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.
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().
Lucy::Index::PostingList is a Lucy::Search::Matcher is a Clownfish::Obj.
Copyright © 2010-2015 The Apache Software Foundation, Licensed under the
Apache License, Version 2.0.
Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The
Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their
respective owners.