#reverse

bin+lib geosuggest-utils

Geosuggest index update utilities

15 releases

0.6.4 Sep 20, 2024
0.6.3 Jun 15, 2024
0.6.2 Mar 23, 2024
0.5.3 Dec 27, 2023
0.5.1 Sep 28, 2023

#207 in HTTP server

Download history 343/week @ 2024-06-13 183/week @ 2024-06-20 141/week @ 2024-06-27 131/week @ 2024-07-04 177/week @ 2024-07-11 215/week @ 2024-07-18 322/week @ 2024-07-25 183/week @ 2024-08-01 228/week @ 2024-08-08 310/week @ 2024-08-15 178/week @ 2024-08-22 198/week @ 2024-08-29 191/week @ 2024-09-05 157/week @ 2024-09-12 376/week @ 2024-09-19 134/week @ 2024-09-26

882 downloads per month
Used in qsv

MIT license

71KB
1.5K SLoC

geosuggest-utils

HTTP service

Examples

Usage example

use tokio;
use anyhow::Result;

use geosuggest_utils::{IndexUpdater, IndexUpdaterSettings};

#[tokio::main]
async fn main() -> Result<()> {
    println!("Build index...");
    let updater = IndexUpdater::new(IndexUpdaterSettings {
        names: None, // no multilang support
        ..Default::default()
    })?;

    let engine = updater.build().await?;

    println!(
        "Suggest result: {:#?}",
        engine.suggest::<&str>("Beverley", 1, None, Some(&["us"]))
    );
    println!(
        "Reverse result: {:#?}",
        engine.reverse::<&str>((11.138298, 57.510973), 1, None, None)
    );

    Ok(())
}

Dependencies

~18–49MB
~784K SLoC