Compare commits

..

2 Commits

Author SHA1 Message Date
5b8639b80f Bumping version to 0.0.41 2024-09-29 16:41:36 -07:00
6c9ef912e6 server: don't touch tantivy if no uids reindexed 2024-09-29 16:41:13 -07:00
7 changed files with 14 additions and 12 deletions

10
Cargo.lock generated
View File

@ -2469,7 +2469,7 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "letterbox"
version = "0.0.40"
version = "0.0.41"
dependencies = [
"build-info",
"build-info-build",
@ -2988,7 +2988,7 @@ dependencies = [
[[package]]
name = "notmuch"
version = "0.0.40"
version = "0.0.41"
dependencies = [
"itertools 0.10.5",
"log",
@ -3625,7 +3625,7 @@ dependencies = [
[[package]]
name = "procmail2notmuch"
version = "0.0.40"
version = "0.0.41"
dependencies = [
"anyhow",
]
@ -4547,7 +4547,7 @@ dependencies = [
[[package]]
name = "server"
version = "0.0.40"
version = "0.0.41"
dependencies = [
"ammonia",
"anyhow",
@ -4646,7 +4646,7 @@ dependencies = [
[[package]]
name = "shared"
version = "0.0.40"
version = "0.0.41"
dependencies = [
"build-info",
"notmuch",

View File

@ -1,6 +1,6 @@
[package]
name = "notmuch"
version = "0.0.40"
version = "0.0.41"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -1,6 +1,6 @@
[package]
name = "procmail2notmuch"
version = "0.0.40"
version = "0.0.41"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -1,6 +1,6 @@
[package]
name = "server"
version = "0.0.40"
version = "0.0.41"
edition = "2021"
default-run = "server"

View File

@ -4,7 +4,7 @@ use log::{debug, error, info};
use sqlx::{postgres::PgPool, types::time::PrimitiveDateTime};
use tantivy::{
collector::{DocSetCollector, TopDocs},
query,
doc, query,
query::{AllQuery, BooleanQuery, Occur, QueryParser, TermQuery},
schema::{Facet, IndexRecordOption, Value},
DocAddress, Index, Searcher, TantivyDocument, TantivyError, Term,
@ -102,8 +102,10 @@ impl TantivyConnection {
self.reindex_uids(pool, &uids).await
}
async fn reindex_uids(&self, pool: &PgPool, uids: &[String]) -> Result<(), ServerError> {
if uids.is_empty() {
return Ok(());
}
// TODO: add SlurpContents and convert HTML to text
use tantivy::{doc, Term};
let start_time = std::time::Instant::now();
let pool: &PgPool = pool;

View File

@ -1,6 +1,6 @@
[package]
name = "shared"
version = "0.0.40"
version = "0.0.41"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -1,5 +1,5 @@
[package]
version = "0.0.40"
version = "0.0.41"
name = "letterbox"
repository = "https://github.com/seed-rs/seed-quickstart"
authors = ["Bill Thiede <git@xinu.tv>"]