zotero/scss/abstracts
Bogdan Abaev 9252e897b7 lexical search refactor
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.
2026-10-27 16:03:02 -07:00
..
_functions.scss Fix item pane splitter style 2024-01-24 23:32:23 -05:00
_layout.scss Adds a Citation Explorer dialog for document integration (#3468) 2025-03-10 22:40:43 -04:00
_mixins.scss lexical search refactor 2026-10-27 16:03:02 -07:00
_placeholders.scss Reactify the Tag Selector 2019-01-07 15:33:45 +02:00
_split-button.scss Remove last few legacy icons #3691 (#4996) 2025-01-21 05:37:56 -05:00
_svgicon.scss fx153: Set menu icons via --menuitem-icon for in-content menus 2026-08-04 14:42:39 -04:00
_utilities.scss fx-compat: long tag fixer (#2649) 2023-03-16 21:20:11 -04:00
_variables.scss Best Match: hybrid lexical and semantic search 2026-10-08 15:10:26 -07:00