pub struct ExternalPriorScorer {
pub params: BayesianBM25Params,
pub bm25: BayesianBM25Scorer,
/* private fields */
}Fields§
§params: BayesianBM25Params§bm25: BayesianBM25ScorerImplementations§
Source§impl ExternalPriorScorer
impl ExternalPriorScorer
pub fn new( params: BayesianBM25Params, index_stats: Arc<IndexStats>, prior_fn: PriorFn, ) -> ScoringResult<Self>
Sourcepub fn score_with_prior(
&self,
term_freq: u64,
doc_length: u64,
doc_freq: u64,
doc_fields: &BTreeMap<String, Value>,
) -> ScoringResult<f64>
pub fn score_with_prior( &self, term_freq: u64, doc_length: u64, doc_freq: u64, doc_fields: &BTreeMap<String, Value>, ) -> ScoringResult<f64>
Compute a fused posterior with the external prior.
Auto Trait Implementations§
impl !RefUnwindSafe for ExternalPriorScorer
impl !UnwindSafe for ExternalPriorScorer
impl Freeze for ExternalPriorScorer
impl Send for ExternalPriorScorer
impl Sync for ExternalPriorScorer
impl Unpin for ExternalPriorScorer
impl UnsafeUnpin for ExternalPriorScorer
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