Skip to main content

FrProfile

Struct FrProfile 

Source
pub struct FrProfile { /* private fields */ }

Implementations§

Source§

impl FrProfile

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl Default for FrProfile

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Profile for FrProfile

Source§

fn min_limit(&self) -> usize

The Géoplateforme asks addok for at least 10 results (api/indexes/address.js: Math.max(params.limit || 10, 10)).

Source§

fn process_query(&self, query: &str) -> String

extract_address, clean_query, remove_leading_zeros.

Source§

fn process_tokens(&self, tokens: Vec<Token>) -> Vec<Token>

glue_ordinal, fold_ordinal, flag_housenumber, synonymize, phonemicize.

Source§

fn name(&self) -> &'static str

Stored in the index; must be unique among registered profiles.
Source§

fn version(&self) -> u32

Bump whenever token processing changes: an index built with another version would no longer match the queries.
Source§

fn min_score(&self) -> f64

Results scoring below this are dropped (addok’s MIN_SCORE).
Source§

fn fields(&self) -> &[FieldSpec]

Indexed text fields, with their boosts.
Source§

fn filters(&self) -> &[&'static str]

Document keys usable as search filters.
Source§

fn synonyms(&self) -> Option<&Synonyms>

Synonyms applied to index and query tokens.
Source§

fn make_labels(&self, doc: &Document, housenumber: Option<&str>) -> Vec<String>

Labels a result is compared against, best one first.
Source§

fn fuzzy_key_map(&self) -> Option<KeyMap>

Keyboard used to limit fuzzy substitutions to neighbouring keys (addok’s FUZZY_KEY_MAP); None tries every letter.
Source§

fn display_label( &self, _doc: &Document, _housenumber: Option<&str>, _query: &str, ) -> Option<String>

The label shown for a result, given the ASCII folded query (empty when reverse geocoding). None shows the first label, like addok’s str(result).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(_simd: S, value: T) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.