Google App Engine 的最佳 Java 文本索引库是什么?
目前我知道指南针可以处理这项工作。但用指南针建立索引看起来相当昂贵。有没有更轻的替代品?
To the moment I know that compass may handle this work. But indexing with compass looks pretty expensive. Is there any lighter alternatives?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
说实话,我不知道Lucene在索引方面是否会比Compass更轻(为什么会这样,Compass不是使用Lucene吗?)。
无论如何,因为您要求替代方案,所以有 GAELucene。我在下面引用了其公告 :
我强烈建议阅读有关 nabble 的整个讨论,内容非常丰富。
以防万一,关于 Compass,Shay Banon 撰写了一篇博客文章,详细介绍了如何在 App Engine 中使用 Compass:http://www.kimchy.org/searchable-google-appengine-with-compass/
To be honest, I don't know if Lucene will be lighter than Compass in terms of indexing (why would it be, doesn't Compass use Lucene for that?).
Anyway, because you asked for alternatives, there is GAELucene. I'm quoting its announcement below:
I warmly recommend to read the whole discussion on nabble, very informative.
Just in case, regarding Compass, Shay Banon wrote a blog entry detailing how to use Compass in App Engine here: http://www.kimchy.org/searchable-google-appengine-with-compass/
Apache Lucene 是 Java 全文索引的实际选择。看起来 Compass Core 包含“Lucene Directory 的实现,用于将索引存储在其中一个数据库(使用 Jdbc)。它与 Compass 代码库分离,可以与纯 Lucene 应用程序一起使用。”加上大量其他东西。您可以尝试仅分离 Lucence 组件,从而剥离多个库并使其更加轻量级。要么完全放弃 Compass,而使用纯粹的、未经修饰的 Lucene。
Apache Lucene is the de-facto choice for full text indexing in Java. Looks like Compass Core contains "An implementation of Lucene Directory to store the index within a database (using Jdbc). It is separated from Compass code base and can be used with pure Lucene applications." plus tons of other stuff. You could try to separate just the Lucence component thereby stripping away several libs and making it more lightweight. Either that or ditch Compass altogether and use pure unadorned Lucene.
对于 Google App Engine,我见过的唯一索引库是 appengine-search,带有关于如何在此页面< /a>.不过我还没有尝试过。
我使用过 Lucene (Compass 所基于的)并发现它可以很好地工作费用相对较低。索引是一项您可以安排在适合您的应用程序的时间进行的任务。
这个SO线程中提到了一些替代索引项目,包括Xapian 和 奴才。不过我还没有检查过其中任何一个,因为 Lucene 很好地完成了我需要的一切。
For Google App Engine, the only indexing library I've seen is appengine-search, with a description of how to use it on this page. I haven't tried it out though.
I've used Lucene (which Compass is based on) and found it to work great with comparatively low expense. The indexing is a task that you can schedule at times that work for your app.
Some alternatives indexing projects are mentioned in this SO thread, including Xapian and minion. I haven't checked either of these out though, since Lucene did everything I needed it to very well.
Google App 引擎内部搜索似乎更好,甚至支持同义词:
https://developers。 google.com/appengine/docs/java/search/
The Google App engine internal search seems better, and even havsupport synonyms:
https://developers.google.com/appengine/docs/java/search/
如果您想在 GAE 上运行 Lucene,您还可以查看 LuGAEne。它是 Lucene 的 Directory 的实现盖埃。
使用方法其实很简单,只需要用
GaeDirectory
替换 Lucene 的标准目录之一gaelucene< /a> 似乎处于“维护模式”(自 2009 年 9 月以来未提交)并且 lucene-appengine当您使用 Objectify 版本 4 时, 尚无法运行在您的应用程序中。
免责声明:我是 LuGAEne 的作者。
If you want to run Lucene on GAE you might also have a look at LuGAEne. It's an implementation of Lucene's Directory for GAE.
Usage is actually pretty simple, just replace one of Lucene's standard directories with
GaeDirectory
gaelucene seems to be in "maintenance mode" (no commit since Sep 2009) and lucene-appengine does not (yet) work when you're using Objectify version 4 in your application.
Disclaimer: I'm the author of LuGAEne.