使用Solr对Mongodb和nodejs进行索引和search

有没有人有任何经验,这个特定的堆栈? 我正在开发一个Web项目,这个项目最终将包含大量的数据,并试图让Solr和一些简单的Mongodb条目一起玩,但是我发现它几乎没有任何信息。 我发现这个: http : //blog.knuthaugen.no/2010/04/cooking-with-mongodb-and-solr.html这是mongodb + solr + PHP,但我很努力地看到我将如何使用节点类似。 任何人有任何见解? 我将不胜感激。 如果这是一个愚蠢的事情来实现,请随时让我知道!

find这个库: https : //github.com/tjgillies/node-lucene

看起来没有太多的文档,但我会给它一个去。

更新:所以一个快速修复(不理想)工作是使用lucene的Perl模块,然后使用Node.js中的subprocessfunction,我能够在lucene中插入和search我的数据。 所以,为了解决这个问题,它可以做到这一点。

这个项目看起来很有希望: https : //github.com/gsf/node-solr 。 不是很多文件,但testing是有前途的描述性的。

那么你可能会在你的mongoose模式中做这样的事情:

schema.pre('save', function (next) { // this will be triggered when your mongoose schema object is saved // TODO add to a queue that sends the documents to SOLR in eg batches // of 2000 }); 

http://mongoosejs.com/docs/middleware.html

我一直想尝试mongo + SOLR +节点,但还没有开始任何编码。

大概截至2012年9月,你会想看看这个。

https://github.com/lbdremy/solr-node-client

好文件http://lbdremy.github.com/solr-node-client/ (虽然我不喜欢使用的networking字体),但似乎很有前途。