Skip to content

Commit

Permalink
fix(indexing): Limit logged chunk to max 100 chars (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
timonv authored Sep 12, 2024
1 parent 8595553 commit f8314cc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion swiftide-core/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,14 @@ impl Debug for Node {
f.debug_struct("Node")
.field("id", &self.id)
.field("path", &self.path)
.field("chunk", &self.chunk)
.field(
"chunk",
&format!(
"{} ({})",
&self.chunk.as_str()[..std::cmp::min(100, self.chunk.len())],
self.chunk.chars().count()
),
)
.field("metadata", &self.metadata)
.field(
"vectors",
Expand Down

0 comments on commit f8314cc

Please sign in to comment.