pub struct MultiFieldBayesianScorer { /* private fields */ }Implementations§
Source§impl MultiFieldBayesianScorer
impl MultiFieldBayesianScorer
pub fn new( field_configs: Vec<FieldConfig>, stats: &Arc<IndexStats>, ) -> ScoringResult<Self>
Sourcepub fn score_document(
&self,
term_freq_per_field: &BTreeMap<String, u64>,
doc_length_per_field: &BTreeMap<String, u64>,
doc_freq_per_field: &BTreeMap<String, u64>,
) -> f64
pub fn score_document( &self, term_freq_per_field: &BTreeMap<String, u64>, doc_length_per_field: &BTreeMap<String, u64>, doc_freq_per_field: &BTreeMap<String, u64>, ) -> f64
Score one document. Each *_per_field map keys on field name
and yields the term frequency / document length / document
frequency for that field. Missing fields contribute sparse
absence rather than a synthetic probability.
Auto Trait Implementations§
impl Freeze for MultiFieldBayesianScorer
impl RefUnwindSafe for MultiFieldBayesianScorer
impl Send for MultiFieldBayesianScorer
impl Sync for MultiFieldBayesianScorer
impl Unpin for MultiFieldBayesianScorer
impl UnsafeUnpin for MultiFieldBayesianScorer
impl UnwindSafe for MultiFieldBayesianScorer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more