parcel KinoSearch cnick Kino;
/** Posting with per-position boost.
*
* RichPosting is similar to
* L<ScorePosting|KinoSearch::Index::Posting::ScorePosting>, but weighting is
* per-position rather than per-field. To exploit this, you need a custom
* L<Analyzer|KinoSearch::Analysis::Analyzer> which assigns varying boosts to
* individual L<Token|KinoSearch::Analysis::Token> objects.
*
* A typical application for RichPosting is an HTMLAnalyzer which assigns
* boost based on the visual size and weight of the marked up text: H1
* blocks get the greatest weight, H2 blocks almost as much, etc.
*/
class KinoSearch::Index::Posting::RichPosting cnick RichPost
inherits KinoSearch::Index::Posting::ScorePosting {
float *prox_boosts;
inert incremented RichPosting*
new(Similarity *similarity);
inert RichPosting*
init(RichPosting *self, Similarity *similarity);
public void
Destroy(RichPosting *self);
void
Read_Record(RichPosting *self, InStream *instream);
incremented RawPosting*
Read_Raw(RichPosting *self, InStream *instream, int32_t last_doc_id,
CharBuf *term_text, MemoryPool *mem_pool);
void
Add_Inversion_To_Pool(RichPosting *self, PostingPool *post_pool,
Inversion *inversion, FieldType *type,
int32_t doc_id, float doc_boost,
float length_norm);
incremented RichPostingScorer*
Make_Matcher(RichPosting *self, Similarity *sim, PostingList *plist,
Compiler *compiler, bool_t need_score);
}
class KinoSearch::Index::Posting::RichPostingScorer cnick RichPostScorer
inherits KinoSearch::Index::Posting::ScorePostingScorer {
inert RichPostingScorer*
init(RichPostingScorer *self, Similarity *similarity,
PostingList *posting_list, Compiler *compiler);
}
/* Copyright 2007-2011 Marvin Humphrey
*
* This program is free software; you can redistribute it and/or modify
* under the same terms as Perl itself.
*/