Skip to content

Instantly share code, notes, and snippets.

@temas
Created August 17, 2011 02:04
Show Gist options
  • Save temas/1150646 to your computer and use it in GitHub Desktop.
Save temas/1150646 to your computer and use it in GitHub Desktop.
lsearch non vows test
require.paths.push("./Common/node");
var lsearch = require("lsearch");
var lconfig = require("lconfig");
lconfig.load("config.json");
lsearch.setIndexPath("tmp/test.index");
lsearch.setEngine(lsearch.engines.CLucene);
console.log("Going to index");
lsearch.indexType("contact",
{"_id":1234, "name":"Thomas Muldowney", "nickname":"temas", "email":[{"type":"work", "value":"temas@singly.com"}]},
function(err, time) {
console.log("Error: " + err);
console.log("Index time " + time);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment