Find a file
Bogdan Abaev 6dec06f18c Ranked lexical scoring over the full-text indexes
Add the query-to-score flow to Zotero.Lexical, built on the content and
item-text indexes:

- Term statistics span both corpora: document frequency sums MATCH
  counts over fulltextContent and fulltextItemText, corpus size sums
  the state tables, so a term's rarity is a property of the library --
  and libraries with few attachments still get real weights
- Units too common to matter are cut relative to the query's best unit
  (INFORMATIVE_WEIGHT_FRACTION), so "of" is dropped next to "communism"
  while an all-common query keeps its best word
- Matchers are index probes: matchContent() against the content index,
  matchFields()/matchNotes()/matchAnnotations() against the item-text
  columns. Notes fetch text only for probe matches plus stale/unindexed
  notes (getStaleOrUnindexedNoteIDs); quoted phrases verify literally
  against stored text everywhere (whitespace/hyphen runs interchange,
  other punctuation must match)
- scoreItemIDs() assembles the score (see below), with a floor and
  cancellation

Ranking algorithm, per query:
  1. Parse into units (words, quoted phrases, CJK runs); trailing
     mid-word token matches as a prefix
  2. Weigh each unit by smoothed BM25 IDF from the combined corpora;
     keep the informative ones
  3. Match: presence (1) in titles, abstracts, annotations; saturated,
     length-normalized term frequency for notes (computed from text)
     and documents (recovered as rank ratios per unit -- for a one-unit
     query, ranks compare documents exactly, and the strongest match
     anchors 1)
  4. Score = sum over units of weight x best boosted evidence across
     sources (title x2, abstract x1.3; max, so one word never counts
     twice), normalized against the query's ceiling: 1 = full-strength
     match on everything asked; below SCORE_FLOOR is no match
2026-08-18 18:00:55 -07:00
.github/workflows CI: Don't run duplicate jobs for same-repo pull requests 2026-07-08 10:50:32 -04:00
app Restore dxcompiler.dll on Windows for WebGPU and leave WebGPU pref on 2026-08-05 14:10:04 -04:00
chrome Ranked lexical scoring over the full-text indexes 2026-08-18 18:00:55 -07:00
defaults/preferences Semantic search on fulltext of attachments 2026-08-13 13:39:30 -07:00
document-worker@6d0c0ce45d Update document-worker submodule 2026-07-15 12:52:00 -04:00
js-build Add SDT support 2026-06-12 13:47:08 +03:00
note-editor@acec74d09b Improve undo/redo in the note editor (#3398) 2026-07-31 14:22:53 +02:00
reader@c6edbfff75 Update reader submodule 2026-07-20 10:50:56 -04:00
resource Generate embeddings with Firefox's inference runtime 2026-08-05 15:41:41 -04:00
scripts Add script for pulling Fluent translations 2026-01-25 22:15:29 -05:00
scss Semantic search on fulltext of attachments 2026-08-13 13:39:30 -07:00
styles@dff7452b24 Update translators, styles, CSL locales, and renamed-styles.json 2026-04-02 15:51:43 -04:00
test Ranked lexical scoring over the full-text indexes 2026-08-18 18:00:55 -07:00
translators@60f2d542ff Update translators submodule 2026-07-15 12:52:54 -04:00
types/gecko fx140: Update type definitions 2025-07-30 22:30:37 -04:00
.babelrc Use production builds of react libraries (#4482) 2024-08-02 03:43:02 -04:00
.gitattributes local semantic search on abstracts 2026-08-05 15:26:55 -04:00
.gitignore Use user-provided codesign script for Windows signing 2024-04-08 10:12:58 +01:00
.gitmodules Rename pdf-worker submodule to document-worker 2026-04-22 15:50:02 -04:00
chrome.manifest Remove old citation dialogs (#5177) 2025-04-02 05:26:06 -04:00
CLAUDE.md Rename pdf-worker submodule to document-worker 2026-04-22 15:50:02 -04:00
CONTRIBUTING.md Add "support questions" to CONTRIBUTING.md 2022-12-01 05:10:42 -05:00
COPYING Update COPYING 2018-03-26 11:27:48 +02:00
eslint.config.mjs Convert ItemPane{SectionElement,Container}Base to ES modules 2026-05-18 15:48:31 -04:00
package-lock.json Update package-lock.json 2026-01-29 13:22:13 -05:00
package.json Upgrade ftl-tx. Fix #5671. 2025-12-20 02:22:23 +01:00
README.md "Zotero wiki" → "Zotero documentation" in app build README 2023-04-26 04:40:22 -04:00
update.rdf Update Fx minVersion to 45 2016-12-13 09:12:55 -05:00
version Update version to 11.0 2026-08-03 14:14:05 -04:00

Zotero

CI

Zotero is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources.

Please post feature requests or bug reports to the Zotero Forums. If you're having trouble with Zotero, see Getting Help.

For more information on how to use this source code, see the Zotero documentation.