Skip to main content

geocoder_core/
settings.rs

1//! addok's `config/default.py` values, unchanged by the BAN configuration.
2
3/// Min/max number of documents retrieved and scored.
4pub const BUCKET_MIN: usize = 10;
5pub const BUCKET_MAX: usize = 100;
6/// Above this many documents, a token is common.
7pub const COMMON_THRESHOLD: usize = 10_000;
8/// Above this many documents, avoid intersecting.
9pub const INTERSECT_LIMIT: usize = 100_000;
10/// Minimum text score considered a match.
11pub const MATCH_THRESHOLD: f64 = 0.9;
12/// Results below this final score are dropped.
13pub const MIN_SCORE: f64 = 0.1;
14pub const QUERY_MAX_LENGTH: usize = 200;
15pub const GEOHASH_PRECISION: usize = 7;
16pub const MIN_EDGE_NGRAMS: usize = 3;
17pub const MAX_EDGE_NGRAMS: usize = 20;
18/// Weight of a document's own importance.
19pub const IMPORTANCE_WEIGHT: f64 = 0.1;
20/// `Search.MAX_MEANINGFUL`.
21pub const MAX_MEANINGFUL: usize = 10;
22/// Default `limit` of the HTTP API.
23pub const DEFAULT_LIMIT: usize = 5;
24/// Maximum number of values of a multi-value filter.
25pub const MAX_FILTER_VALUES: usize = 10;