Releases / TinyStore 0.4.1
TinyStore 0.4.1
TinyStore 0.4.1 came out on 31 October 2026. Search can now answer a search
box while its reader types, finding the words that a half-typed word begins.
A key that a nested with gives again now has one value wherever you look,
and two fixes make jobs and copies of a store more reliable.
- Search
- As you type:
prefixreads the last word as the start of longer words.
- As you type:
As you type
A search box that answers on every keystroke sends a word typed halfway:
crypt on its way to cryptography. With prefix, Search reads the last
word of the text as the start of a word too, so the box finds every document
with a word that starts with it:
const courses = store.index<{ name: string }>('courses', { fields: { name: 1 } })
const { hits } = await courses.search({ text: 'crypt', prefix: true })
// Cryptanalysis, Cryptography, Foundations of cryptography, Cryptographic methods of information securitycourses = store.index("courses", Course, fields={"name": 1})
result = await courses.search("crypt", prefix=True)- Only the last word is a prefix, and only while the reader may still be
typing it:
cryptwith a space after it is a whole word, and so is a single letter. - The words a prefix begins weigh half their field's weight, so a document that holds the word as typed usually ranks first.
- A half-typed word that begins a word in the index is never read as a typo.
One that begins nothing is corrected as any word is, and
correctedsays so. - A prefix reads at most the 64 words that it begins and that the most documents hold, in each field.
As you type has the details.
Fixes
- A key that a nested
withgives again replaces the outer value, as an object spread does. Before,log.with({ component: 'http' })and then.with({ component: 'access' })printed both values, kept onlyaccess, andwherefound the event by either. Now the console printscomponent=accessonce, the event keeps it, and awherebycomponent: 'http'doesn't find the event. The same holds forbindin Python,Within Go and a span inside another in Rust. A key written twice in an event, as another program's line may write it, is found by its last value, in events that 0.4.0 kept too. - A worker that starts as its store closes now stops with the store, instead of writing to a file that is already closed.
- A copy of a store that took the first commit of its home's
blobs.dbno longer drops its link to the home again and again.
Install
bun add @tinyshed/tinystore@0.4.1
npm install @tinyshed/tinystore@0.4.1pip install tinyshed-tinystore==0.4.1go get tinyshed.org/tinystore@v0.4.1cargo add tinystore@0.4.1
cargo install tinystore-cli@0.4.1Nothing in a store's files changes, so 0.4.0 and 0.4.1 open each other's
stores. If your program reaches a server, update the server with the SDK
before you search with prefix: a 0.4.0 server refuses it with an
unimplemented error that names the field. The server image is
ghcr.io/tinyshed/tinystore:0.4.1.
Every commit since 0.4.0 is in the GitHub release.