Skip to content

Commit

Permalink
fix journal uri
Browse files Browse the repository at this point in the history
Signed-off-by: Zhenbo Li <[email protected]>
  • Loading branch information
Endle committed Apr 17, 2024
1 parent 41ab0a2 commit 492885a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion fire_seq_search_server/src/load_notes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::process;

use rayon::prelude::*;
use crate::query_engine::ServerInformation;
use crate::JOURNAL_PREFIX;


pub fn read_all_notes(server_info: &ServerInformation) -> Vec<(String, String)> {
Expand Down Expand Up @@ -40,7 +41,8 @@ pub fn read_all_notes(server_info: &ServerInformation) -> Vec<(String, String)>
= read_specific_directory(&journals_page).par_iter()
.map(|(title,md)| {
let content = crate::markdown_parser::parse_logseq_notebook(md, title, server_info);
(title.to_string(), content)
let tantivy_title = JOURNAL_PREFIX.to_owned() + &title;
(tantivy_title, content)
}).collect(); //silly collect.


Expand Down
4 changes: 2 additions & 2 deletions fire_seq_search_server/src/post_query/highlighter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl RenderBlock {
// pub for test
pub fn flattern(&mut self) {
self.check();
info!("Flattern: root = {:?}", &self);
debug!("Flattern: root = {:?}", &self);
if self.children.is_empty() { return ; }
let mut result = Vec::new();
for i in 0..self.children.len() {
Expand All @@ -122,7 +122,7 @@ impl RenderBlock {
result.extend_from_slice(&self.children[i].children); //TODO avoid copy here
}
}
info!("Flattern: collected children {:?}", &result);
debug!("Flattern: collected children {:?}", &result);
let result: Vec<RenderBlock> = result.into_iter()
.filter(|v| !v.is_empty() )
.collect();
Expand Down

0 comments on commit 492885a

Please sign in to comment.