Skip to content

Search Engine that helps find the information by searched value

Notifications You must be signed in to change notification settings

PavelDeuce/search-engine

Repository files navigation

search-engine

Actions Status Node CI Maintainability Test Coverage

About

Search Engine that helps find the information by searched value

Example

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);
console.log(searchEngine.search('shoot at me')); // ['doc2', 'doc1']