Skip to main content

LuProfile

Struct LuProfile 

Source
pub struct LuProfile;

Trait Implementations§

Source§

impl Profile for LuProfile

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 min_limit(&self) -> usize

Number of results addok computes at least, whatever the requested limit; the best limit of them are returned. It changes which collectors run (a bucket is “full” or “dry” relative to it).
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 process_query(&self, query: &str) -> String

addok’s QUERY_PROCESSORS: string cleanup applied to the ASCII folded query only, before tokenizing.
Source§

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

addok’s PROCESSORS after tokenize and normalize, run on index and query text alike.
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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more