/*
* 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.7
* Contact: developers@trieve.ai
* Generated by: https://openapi-generator.tech
*/
use crate::models;
/// GeoInfoWithBias : Location bias lets you rank your results by distance from a location. If not specified, this has no effect. Bias allows you to determine how much of an effect the location of chunks will have on the search results. If not specified, this defaults to 0.0. We recommend setting this to 1.0 for a gentle reranking of the results, >3.0 for a strong reranking of the results.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GeoInfoWithBias {
/// Bias lets you specify how much of an effect the location of chunks will have on the search results. If not specified, this defaults to 0.0. We recommend setting this to 1.0 for a gentle reranking of the results, >3.0 for a strong reranking of the results.
#[serde(rename = "bias")]
pub bias: f64,
#[serde(rename = "location")]
pub location: Box<models::GeoInfo>,
}
impl GeoInfoWithBias {
/// Location bias lets you rank your results by distance from a location. If not specified, this has no effect. Bias allows you to determine how much of an effect the location of chunks will have on the search results. If not specified, this defaults to 0.0. We recommend setting this to 1.0 for a gentle reranking of the results, >3.0 for a strong reranking of the results.
pub fn new(bias: f64, location: models::GeoInfo) -> GeoInfoWithBias {
GeoInfoWithBias {
bias,
location: Box::new(location),
}
}
}