1.1.5 • Published 7 months ago

@diplodoc/search-extension v1.1.5

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

Diplodoc search extension

NPM version

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 tolerance behavior. tolerance=0 - only search for strict equal words tolerance=1 - also search for words with unspecified tail. word* tolerance=2 - also search for words with unspecified tail and head. *word*

  • Adds confidence behavior. phrased - default. Additionally scores results by found phrase length sparsed - Uses default lunr scoring algorithm.

1.1.5

7 months ago

1.1.4

8 months ago

1.1.3

9 months ago

1.1.2

9 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.0.0

9 months ago