Skip to main content

import

Function import 

Source
pub fn import(
    reader: impl BufRead,
    source: Source,
    profile: Arc<dyn Profile>,
    output: &Path,
    progress: impl FnMut(ImportProgress),
) -> Result<ImportStats, GeocoderError>
Expand description

Index every document of reader and write the index to output.

The index is written to a temporary file next to output, then renamed: a process opening output meanwhile sees the previous index, never a partial one. Invalid lines are counted and skipped.