This is the implementation of training Hexlet project Search Engine (JS: Algorithms and Data Structures №1)
Search Engine
The basic algorithms and data structures in search engines are studied. In practice, various search methods, indexing, ranking, relevance metrics are used, and an inverse index is built.
Usage Example:
import buildSearchEngine from '@hexlet-code';
const doc1 = { id: 'doc1', text: "I can't shoot straight unless I've had a pint!" };
const doc2 = { id: 'doc2', text: "Don't shoot shoot shoot that thing at me." };
const doc3 = { id: 'doc3', text: "I'm your shooter." };
const docs = [doc1, doc2, doc3];
const searchEngine = buildSearchEngine(docs);
searchEngine.search('shoot'); // ['doc1', 'doc2']