diff --git a/server/src/tantivy.rs b/server/src/tantivy.rs index 5acbd2c..7ed23ca 100644 --- a/server/src/tantivy.rs +++ b/server/src/tantivy.rs @@ -1,6 +1,6 @@ use std::collections::HashSet; -use log::{debug, error, info}; +use log::{debug, error, info, warn}; use sqlx::{postgres::PgPool, types::time::PrimitiveDateTime}; use tantivy::{ collector::{DocSetCollector, TopDocs}, @@ -31,7 +31,8 @@ pub struct TantivyConnection { fn get_index(db_path: &str) -> Result { Ok(match Index::open_in_dir(db_path) { Ok(idx) => idx, - Err(_) => { + Err(err) => { + warn!("Failed to open {db_path}: {err}"); create_news_db(db_path)?; Index::open_in_dir(db_path)? }