mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2025-02-02 08:12:20 +00:00
don't index drafts (#656)
This commit is contained in:
parent
8ab690001d
commit
bf7603d439
1 changed files with 4 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue