diff --git a/plume-models/src/search/searcher.rs b/plume-models/src/search/searcher.rs index 87ee6d7..2a56774 100644 --- a/plume-models/src/search/searcher.rs +++ b/plume-models/src/search/searcher.rs @@ -148,6 +148,10 @@ impl Searcher { } pub fn add_document(&self, conn: &Connection, post: &Post) -> Result<()> { + if !post.published { + return Ok(()); + } + let schema = self.index.schema(); let post_id = schema.get_field("post_id").unwrap();