pub struct FullTextBoost {
pub boost_factor: f64,
pub phrase: String,
}
Expand description
FullTextBoost : Boost phrase is useful for when you want to boost certain phrases in the fulltext (SPLADE) and BM25 search results. I.e. making sure that the listing for AirBNB itself ranks higher than companies who make software for AirBNB hosts by boosting the in-document-frequency of the AirBNB token (AKA word) for its official listing. Conceptually it multiples the in-document-importance second value in the tuples of the SPLADE or BM25 sparse vector of the chunk_html innerText for all tokens present in the boost phrase by the boost factor like so: (token, in-document-importance) -> (token, in-document-importance*boost_factor).
Fields§
§boost_factor: f64
Amount to multiplicatevly increase the frequency of the tokens in the phrase by
phrase: String
The phrase to boost in the fulltext document frequency index
Implementations§
Source§impl FullTextBoost
impl FullTextBoost
Sourcepub fn new(boost_factor: f64, phrase: String) -> FullTextBoost
pub fn new(boost_factor: f64, phrase: String) -> FullTextBoost
Boost phrase is useful for when you want to boost certain phrases in the fulltext (SPLADE) and BM25 search results. I.e. making sure that the listing for AirBNB itself ranks higher than companies who make software for AirBNB hosts by boosting the in-document-frequency of the AirBNB token (AKA word) for its official listing. Conceptually it multiples the in-document-importance second value in the tuples of the SPLADE or BM25 sparse vector of the chunk_html innerText for all tokens present in the boost phrase by the boost factor like so: (token, in-document-importance) -> (token, in-document-importance*boost_factor).
Trait Implementations§
Source§impl Clone for FullTextBoost
impl Clone for FullTextBoost
Source§fn clone(&self) -> FullTextBoost
fn clone(&self) -> FullTextBoost
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more