@diplodoc/search-extension
v3.0.5
Published
Lunr based offline search extension for Diplodoc platform
Keywords
Readme
Diplodoc search extension
This is an extension of the Diplodoc platform, which adds offline search functionality. It uses lunr search
The extension contains some parts:
Indexer {#indexer}
Extracts text information from documents. Prepares search index and search documents registry.
Instance methods:
add - Adds new entry to search index
release - Dumps index and registry for target language.
Worker {#worker}
Implements client search worker interface. Uses prepared in indexer lunr index to resolve search requests.
Extends search score algorithm:
Adds
tolerancebehavior.tolerance=0- only search for strict equal wordstolerance=1- also search for words with unspecified tail.word*tolerance=2- also search for words with unspecified tail and head.*word*Adds
confidencebehavior.phrased- default. Additionally scores results by found phrase lengthsparsed- Uses default lunr scoring algorithm.
Documentation
- For AI agents and developers — see AGENTS.md for setup, scripts, and contribution notes.
