dataSources.pushDictionary
Replaces the source's dictionary with every entity id you have and the names each one goes by. From then on, every passage is tagged with the ids whose names its text mentions, in addition to the ids its document asserts. An entities filter and entities() then find a tag wherever it is written. Passages indexed earlier are re-tagged in the background (a relink), and nothing is re-embedded. Push the whole dictionary after each load of the tables it comes from; an unchanged dictionary commits nothing. It takes an array or any iterable and sends it in pages, so a register of 250,000 entries is fine. Matching ignores case and a tag's separators, matches whole words only, and prefers the longest name. A name needs at least three letters or digits.
const assets = await Assets.toArray(); const report = await Manuals.pushDictionary( assets.map((a) => ({ id: a.tag, names: [a.tag, a.name] })), ); if (report.unmatchable.count) console.warn(report.unmatchable.examples);