The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
parcel KinoSearch cnick Kino;

/** Intersect required and optional scorers.
 */

class KinoSearch::Search::RequiredOptionalScorer cnick ReqOptScorer
    inherits KinoSearch::Search::PolyMatcher {

    Matcher      *req_matcher;
    Matcher      *opt_matcher;
    bool_t        opt_matcher_first_time;

    inert incremented RequiredOptionalScorer* 
    new(Similarity *similarity, Matcher *required_matcher, 
        Matcher *optional_matcher);

    inert RequiredOptionalScorer* 
    init(RequiredOptionalScorer *self, Similarity *similarity, 
         Matcher *required_matcher, Matcher *optional_matcher);

    public void
    Destroy(RequiredOptionalScorer *self);

    public int32_t
    Next(RequiredOptionalScorer *self);

    public int32_t
    Advance(RequiredOptionalScorer *self, int32_t target);

    public float
    Score(RequiredOptionalScorer *self);

    public int32_t 
    Get_Doc_ID(RequiredOptionalScorer *self);
}

/* Copyright 2006-2011 Marvin Humphrey
 *
 * This program is free software; you can redistribute it and/or modify
 * under the same terms as Perl itself.
 */