mirror of
https://github.com/zotero/zotero.git
synced 2026-12-02 00:47:18 +00:00
The item-text FTS5 index (fulltextItemText, its CJK twin, state table
and backfill queue) is gone. BM25 adds little to short texts beyond
term rarity, and its length normalization lowered an item's title
match when it had an abstract, while a document could outscore a
matching title from the other index.
Zotero.Lexical now matches fields, creators, tags, notes and
annotations through the data tables, as the Fields & Tags quick search
does (notes through the note index's predicate), and scores them by
weighted coverage: a term's weight is its rarity across the library's
top-level items, times a factor for the kind of text it matched in
(title, creator, year, tag 1.0; publication 0.9; abstract 0.8; note,
annotation 0.7; other fields 0.6). Terms in over half the items are
dropped; consecutive words found together earn a bonus; words match
whole tokens, with a trailing * for prefixes.
Attachment text keeps BM25 and the proximity gate over the content
index, scaled to 0.7 of a full match, so a paper by Smith from 2019
outranks every paper citing "Smith 2019" in its text. An item's own
evidence combines with its best child's. scoreItemIDs returns
{ scores, matches }, with a record of where each item matched; Best
Match hands a hybrid query past ten terms to the semantic engine
alone. The ftindex version bump rebuilds the content index.
The query's terms reach the item pane: editable-text marks them in
unfocused fields through the control's editor find selection, applied
a frame after render; annotation rows mark them with spans. Excerpts
gain creator, tag, date and publication sources.
|
||
|---|---|---|
| .. | ||
| _functions.scss | ||
| _layout.scss | ||
| _mixins.scss | ||
| _placeholders.scss | ||
| _split-button.scss | ||
| _svgicon.scss | ||
| _utilities.scss | ||
| _variables.scss | ||