server: improve tantivy performance by reusing IndexReader
Also improve a bunch of trace logging
This commit is contained in:
@@ -505,7 +505,7 @@ async fn tantivy_search(
|
||||
pub struct Mutation;
|
||||
#[Object]
|
||||
impl Mutation {
|
||||
#[instrument(skip_all, fields(query, bool))]
|
||||
#[instrument(skip_all, fields(query=query, unread=unread))]
|
||||
async fn set_read_status<'ctx>(
|
||||
&self,
|
||||
ctx: &Context<'ctx>,
|
||||
@@ -522,7 +522,7 @@ impl Mutation {
|
||||
nm::set_read_status(nm, &query, unread).await?;
|
||||
Ok(true)
|
||||
}
|
||||
#[instrument(skip_all, fields(query, tag))]
|
||||
#[instrument(skip_all, fields(query=query, tag=tag))]
|
||||
async fn tag_add<'ctx>(
|
||||
&self,
|
||||
ctx: &Context<'ctx>,
|
||||
@@ -534,7 +534,7 @@ impl Mutation {
|
||||
nm.tag_add(&tag, &query)?;
|
||||
Ok(true)
|
||||
}
|
||||
#[instrument(skip_all, fields(query, tag))]
|
||||
#[instrument(skip_all, fields(query=query, tag=tag))]
|
||||
async fn tag_remove<'ctx>(
|
||||
&self,
|
||||
ctx: &Context<'ctx>,
|
||||
|
||||
Reference in New Issue
Block a user