mirror of
https://github.com/zotero/zotero.git
synced 2026-10-11 03:38:25 +00:00
Make the chunk the single unit of a search match. Both engines now score the same passages instead of returning two incompatible things that had to be merged: lexical windows cut around a matched word, and semantic chunks. A window cut around a word doesn't know where it sits in the document, so it could not carry a section or page, and overlap between the two kinds had to be guessed at with a substring probe. A chunk knows its location, which is what a snippet header and navigating to the match both need. Chunks come from the best source an item has: the ones the semantic index already holds, ranked by the model or not, and for an unindexed item the same chunking applied to its structured text or, failing that, its flat text. Everything above the ladder is indifferent to which rung ran. An item returns at most three matches, blending the model's score with how much of the query the chunk's own words carry. Each entry keeps the whole chunk plus the extent of the one line worth quoting, so the tree can show a line and the item pane can read the passage without deriving twice. Choosing that line is the expensive half -- a chunk that only means the query has to be read by the model -- so it happens after ranking and only for the three that survive, asking about an item's lines in a single call. Structured text is only used when already extracted. Generating it costs seconds, which is not a price a preview can charge. Fix scrolling while matches fill in. A row asked for its matches when painted, but a paint pass only touches rows newly in view and each request replaces the last, so rows still waiting were dropped and re-requested; the request now states everything still on screen. Restoring scroll position also snapped to a row boundary, discarding how far into the top row the view was scrolled -- unnoticeable at 24px rows, a visible jump backwards at the height of a match row. |
||
|---|---|---|
| .. | ||
| components | ||
| content | ||
| resource | ||
| tests | ||
| chrome.manifest | ||
| runtests.sh | ||