v0.6.0

Supported File Formats

Last updated


Which files the watcher indexes, which it skips, and how each format is split into searchable chunks.

Routing by Extension


Extensions are compared in lower case (internal/filesystem/walkFiles.go).
ExtensionParserChunk unitLog kind
.pdfpdftotext -layout -enc UTF-8, form feeds removedParagraphpdf
.docxBody text, then headers, footers, footnotes, and endnotesParagraphdocx
.pptxSlide XML text, slides in numeric orderOne chunk per non-empty slidepptx
.csv, .tsvCSV reader (tab separator for .tsv), UTF-8 BOM stripped32 data rowscsv
.xlsxFirst worksheet only32 data rowsxlsx
Any other extensionRead as plain text when it passes the text checkParagraphtext

Paragraph Chunks


Text from PDF, DOCX, and plain-text files is split on blank lines; a line that contains only spaces or tabs also counts as blank. Each paragraph is trimmed, empty paragraphs are dropped, and the remaining paragraphs are numbered from 1 with the total count stored alongside. Lines inside a paragraph keep their original line breaks.
  1. Alpha Go notes
  2. line two
  3. Second paragraph about SQLite

This file produces two chunks: chunk 1 holds the first two lines with their line break kept, and chunk 2 holds the last line.

Table Chunks


CSV, TSV, and XLSX files are read with the first row as the header. Data rows are grouped 32 per chunk, and each row is rendered on its own line as [row] header=value, ... with 1-based row numbers:
  1. [1] name=ann, role=dev
  2. [2] name=bob, role=ops

CaseBehavior
Header cell is emptyThe key becomes col<N>
Row has more cells than the headerExtra cells are dropped
Only a header row, or the file is emptyNo chunks; any earlier rows for the file are dismissed
CSV or TSV larger than 1 MiBParser error; the file is not stored

Skipped Files


RuleExamples
Excluded name.DS_Store
Binary extensionImages (.png, .jpg, .heic, .svg), video (.mp4, .mov), audio (.mp3, .wav), archives (.zip, .tar, .gz), executables and libraries (.exe, .so, .dylib), installers (.dmg, .deb), bytecode (.class, .jar, .pyc, .wasm), databases (.db, .sqlite), design files (.psd, .fig), fonts (.ttf, .woff2)
Fails the text checkThe first 8 KiB contains a NUL byte or is not valid UTF-8, or the file is empty

Skipped files are still recorded in the snapshot, so they are not re-examined until they change.

中文