trieve-client 0.11.7

Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
Documentation
/*
 * Trieve API
 *
 * Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
 *
 * The version of the OpenAPI document: 0.11.6
 * Contact: developers@trieve.ai
 * Generated by: https://openapi-generator.tech
 */

use crate::models;

/// DistancePhrase : Distance is useful for when you want to boost certain phrases in the fulltext search results for official listings. I.e. making sure that the listing for AirBNB itself ranks higher than companies who make software for AirBNB hosts by boosting the AirBNB token for its official listing.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DistancePhrase {
    /// Amount to multiplicatevly increase the frequency of the tokens in the phrase by
    #[serde(rename = "distance_factor")]
    pub distance_factor: f32,
    /// The phrase to boost in the fulltext document frequency index
    #[serde(rename = "phrase")]
    pub phrase: String,
}

impl DistancePhrase {
    /// Distance is useful for when you want to boost certain phrases in the fulltext search results for official listings. I.e. making sure that the listing for AirBNB itself ranks higher than companies who make software for AirBNB hosts by boosting the AirBNB token for its official listing.
    pub fn new(distance_factor: f32, phrase: String) -> DistancePhrase {
        DistancePhrase {
            distance_factor,
            phrase,
        }
    }
}