github tobiaswuerth/sift v0.2.0

latest releases: v2.3.0, v2.2.1, v2.2.0...
one month ago

Added

  • Search results can carry front-matter fields (fields, e.g. ["url", "created"], or ["*"] for all) and leave
    out the text (compact), so agents can survey many results cheaply. --fields and --compact on the CLI.
  • Range filters on front-matter fields, e.g. {"created": {">=": "2024-06", "<": "2025"}} or
    -f "created>=2024-06". Dates compare at the precision given.
  • get returns only some lines if asked, e.g. a hit's "17-26" (--lines on the CLI).
  • get finds a document by its file name if no other document in the collection has that name, e.g.
    arxiv/2603.29315.md for arxiv/2026/03/2603.29315.md; otherwise it lists the matches.
  • The server tells agents which front-matter fields each collection has; status lists them too.

Changed

  • sift serve gives its GPU memory back when idle. Models and vectors load into RAM, move to the GPU when a
    search needs them, and return to RAM after 5 minutes without GPU use. Once released, the memory is free
    for other programs; the first search afterwards takes about a second longer. If other programs have taken the
    memory meanwhile, sift stays on the CPU instead.
  • search returns chunks with any of the query's terms when none has them all, unless the query uses operators.
  • get serves indexed documents only, never other files below a collection's folder, and returns \n line
    endings, like search results.
  • Front matter lists can be written one - item per line, as Obsidian, Jekyll and Hugo do; comment lines are
    skipped, and a key without a value means null.
  • Blank queries return nothing in every search mode, and query gathers at least k candidates per mode.
  • Index worker processes are spawned on every platform; forking a process that runs threads can deadlock.

Fixed

  • sift serve could hang on Ctrl+C, however often it was pressed: on shutdown, uvicorn waits for every
    connection to close (Python 3.12+), and a client that left a request unfinished never closed its connection.
    The server now waits at most 3 seconds for open requests, then stops.
  • sift index stalled for minutes on a heading followed by a long run of spaces.
  • Titles: "# Learning C#" lost its "#", a bare "#" line took the next paragraph as title, and comments in fenced
    code blocks counted as headings.
  • Line numbers in search hits were off after form feeds and other characters that str.splitlines treats as line
    ends.
  • UTF-16 files (Windows PowerShell 5.1 writes them with >) were indexed as text full of NUL characters.
  • Empty front matter (--- twice) was indexed as text.
  • A file name with bytes that aren't UTF-8 (Linux) aborted sift index; such files are now skipped with a message.
  • A huge k or filter number crashed the search tools; k is capped, a filter number is a clear error.
  • Calibrating the batch size divided by zero when memory didn't grow with the batch.
  • sift embed crashed on chunks that had no text in the keyword index.
  • The embedding progress divided by zero when the clock hadn't advanced.
  • Ctrl+C on sift serve printed a traceback instead of stopping quietly; errors such as a port in use now print
    one line.
  • Database errors reach MCP clients as messages, and the CLI reports an unusable SIFT_HOME instead of crashing.
  • sift add ~/notes works where the shell doesn't expand ~.

Don't miss a new sift release

NewReleases is sending notifications on new releases.