1.0.2 • Published 4 years ago
megasearchjs v1.0.2
MEGASEARCH
MEGASEARCH is a search libary that trades storage space for less memory usage allowing you to search very large amounts of data.
Installation
Using NPM to install MEGASEARCH.
npm install megasearchjsUsage
const megasearch = require('megasearchjs');
let ms = new megasearch();
// Add a new document
ms.add("insertidhere", "document data...");
// Query MEGASEARCH
ms.query("what ever search query you have").then((data) => {
console.log(data);
});
// Get document by ID
ms.id("insertidhere").then((data) => {
console.log(data);
});Notes
Your data will be stored in a folder call /store