waldo-imii
v0.0.3
Published
In-memory inverted-index
Downloads
11
Readme
An in-memory inverted index for experimenting with information retrieval techniques.
Usage
Install:
$ npm install waldo-imii
Create:
var imii = require('waldo-imii');
var myIndex = imii();
API
var index = imii(options)
Keys:
compareDocument
: function that compares 2 documents and returns -VE/0/+VE values.
index.postDocument(doc, terms, cb)
index.postDocumentUnsorted(doc, terms, cb)
Use this method when you're unable to present documents to the index in sorted order. Much slower.
index.postTerm(doc, terms, cb)
index.postTermUnsorted(doc, terms, cb)
Use this method when you're unable to present documents to the index in sorted order. Much slower.