Skip to content

Commit 6b3ae69

Browse files
committed
feat(indexer): extract note_date from frontmatter and filename during indexing
1 parent ec55952 commit 6b3ae69

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/indexer.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,9 @@ pub fn index_file(
305305
None
306306
});
307307

308+
// Extract note_date from frontmatter or filename
309+
let note_date = crate::temporal::extract_note_date(&frontmatter, rel_path);
310+
308311
// 2. Embed all chunks
309312
let token_counts: Vec<usize> = chunks
310313
.iter()
@@ -351,7 +354,7 @@ pub fn index_file(
351354
&tags,
352355
&docid,
353356
created_by.as_deref(),
354-
None,
357+
note_date,
355358
)?;
356359

357360
let mut next_vector_id: u64 = store.next_vector_id()?;

0 commit comments

Comments
 (0)