lucivy-wasm 4.2.0 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -1
- package/package.json +1 -1
- package/pkg/lucivy.wasm +0 -0
package/README.md
CHANGED
|
@@ -1,9 +1,52 @@
|
|
|
1
|
-
# lucivy-wasm 4.
|
|
1
|
+
# lucivy-wasm 4.3.1
|
|
2
2
|
|
|
3
3
|
**One index answers every question, and every answer is checked.** The default index answers exact substrings, matches across separators, typos across token boundaries, regular expressions and two-character needles — with BM25 and the exact bytes of every match — and nothing to configure per question; the ground-truth harness compares every answer to a scan of the files. In the browser — the same engine as the native bindings, built with emscripten: **threads** (pthreads over SharedArrayBuffer), OPFS persistence, snapshot import. Runs in a Web Worker. MIT.
|
|
4
4
|
|
|
5
5
|
[**Try the live playground**](https://l-defraiteur.github.io/lucivy/) — it clones lucivy's own source from GitHub and indexes it in your browser.
|
|
6
6
|
|
|
7
|
+
### What's new in 4.3.1
|
|
8
|
+
|
|
9
|
+
A patch release that fixes concurrency between searches and writes. The index format is unchanged.
|
|
10
|
+
|
|
11
|
+
- **Searches during commits no longer lose writes.** A BM25 statistic read across two states of the index made a search panic. The panic took down the shard serving it, and documents disappeared behind commits that returned `Ok`, or later commits froze. The statistic is now bounded, and a search that panics answers an error instead of killing the shard.
|
|
12
|
+
- **One commit in flight per shard.** Writes, commits and drains that arrive meanwhile wait, and run when it ends, in their order.
|
|
13
|
+
- **Closing commits, always.** Dropping an index without `close()` now commits what was still queued. Writes to a shard without a writer are reported by the next commit instead of being dropped silently.
|
|
14
|
+
- The browser playground starts its engine only on a cross-origin isolated page. A hard reload no longer leaves it dead.
|
|
15
|
+
|
|
16
|
+
### What's new in 4.3
|
|
17
|
+
|
|
18
|
+
- **Indexing 48 → 35 s on the same index.** The whole kernel (Linux 7.2,
|
|
19
|
+
101 141 files, 941 MB) on a 24-core machine, the same 308 segments, the
|
|
20
|
+
same ids minted, the same answers. Four pieces, none of them an option: a
|
|
21
|
+
derived group index next to every dictionary generation (`.pidx`, 2.5 % of
|
|
22
|
+
the `.sfx`, rebuilt in RAM when an older index lacks it) that reaches the
|
|
23
|
+
right parent group by binary search instead of reading every header
|
|
24
|
+
before it; the commit no longer stops the world to forget its pending
|
|
25
|
+
texts (they live by commit epoch and are dropped whole — 6.7 s of serial
|
|
26
|
+
path gone); the suffix collector allocates per token instead of per
|
|
27
|
+
occurrence; and a text minted since the last fold is found in the pending
|
|
28
|
+
table before every FST part is walked (FST walks 68 → 38 s of CPU).
|
|
29
|
+
- **Two exactness fixes, present since 4.0.0.** A segment holding few of a
|
|
30
|
+
candidate list's ids kept one item per id and lost the repeated
|
|
31
|
+
occurrences of a needle inside one token (`0xdedede00` for `de`) — whether
|
|
32
|
+
a segment took that path depended on its size, so the same corpus was
|
|
33
|
+
exact at 16 writer threads and lost 3 spans of 7.9 M at 24. And relaxed
|
|
34
|
+
separators could report a match ending inside a multi-byte character
|
|
35
|
+
(`D\n,,“underscan`): a word's content overlap was taken from the word
|
|
36
|
+
after the next when the next one began with a three-byte character, and
|
|
37
|
+
an anchored word candidate was accepted at any suffix. Both fixed on the
|
|
38
|
+
query side (an existing index answers exactly with the new reader), the
|
|
39
|
+
second at indexing too; tests red on the old code.
|
|
40
|
+
- **The segment's dictionary pair is named for what it is:**
|
|
41
|
+
`<uuid>.<field>.minted.termtexts` and `.minted.sfx` (the texts a segment
|
|
42
|
+
minted first and the FST over them, folded into the next generation),
|
|
43
|
+
instead of `.newtexts` / `.newsfx`. Every reader still opens the old names.
|
|
44
|
+
- **Compatibility**: 4.2 opens a 4.3 index and 4.3 opens 3.0.x to 4.2 indexes
|
|
45
|
+
as before; the only thing 4.2 cannot do is fold the pairs a 4.3 writer left
|
|
46
|
+
pending after a crash (a cleanly closed index has none). Every binding
|
|
47
|
+
already had `update` (delete by `_node_id` and add) — editing one file
|
|
48
|
+
costs that file, not a rebuild.
|
|
49
|
+
|
|
7
50
|
### What's new in 4.2
|
|
8
51
|
|
|
9
52
|
- **`search(query, { fields: false })` no longer reads any document**: the id comes from the fast field; with `fields: true` the documents are read through the scheduler (verified on 10 000 kernel files in Chrome: 968 hits with their content in 260 ms, 500 without in 12 ms).
|
package/package.json
CHANGED
package/pkg/lucivy.wasm
CHANGED
|
Binary file
|