fix: Make the examples compile

This commit is contained in:
Clément Renault 2019-05-10 12:05:19 +02:00
parent dff81bb161
commit 2844cb5bca
No known key found for this signature in database
GPG Key ID: 0151CDAB43460DAE
2 changed files with 5 additions and 1 deletions

View File

@ -464,6 +464,10 @@ impl Index {
self.0.lease()
}
pub fn schema(&self) -> Schema {
self.0.lease().schema.clone()
}
pub fn documents_addition(&self) -> DocumentsAddition {
let ranked_map = self.0.lease().ranked_map.clone();
DocumentsAddition::new(self, ranked_map)

View File

@ -52,7 +52,7 @@ fn index(
{
let database = Database::start_default(database_path)?;
let index = database.create_index("default".to_string(), schema.clone())?;
let index = database.create_index("default", schema.clone())?;
let mut rdr = csv::Reader::from_path(csv_data_path)?;
let mut raw_record = csv::StringRecord::new();