在 Lucene 3.5.0 中禁用 ConcurrentMergeScheduler
我需要在 Lucene 3.5.0 中禁用 ConcurrentMergeScheduler,因为由于线程创建的限制,它无法在 Google AppEngine 上工作 - 不允许创建任何线程。
有任何提示如何做到这一点吗?
I need to disable ConcurrentMergeScheduler in Lucene 3.5.0, because it does not work on Google AppEngine due to limitation on thread creation - it is not allowed to create any thread.
Any hints how to do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
好的,基本上合并可以在 IndexWriterConfig.setMergeScheduler(new SerialMergeScheduler()); 中提供
之后就可以在 GAE 中将 RAMDirectory 与 IndexWriter 一起使用。
Okay, basically the merger can be supplied in IndexWriterConfig.setMergeScheduler(new SerialMergeScheduler());
After that it is possible to use RAMDirectory with IndexWriter in GAE.
请注意,Google App Engine 使用多个网络服务器来运行您的应用。因此
RAMDirectory
不起作用,但是您可以尝试针对 Google 应用引擎的 lucene 的GAE
特定实现,或者使用 Google 搜索 API。Be careful Google App Engine uses multiple web servers to run your application. So a
RAMDirectory
does not work, however you can try aGAE
specific implementation of lucene for google app engine, or use the Google Search API.Lucene 有一个特定于 GAE 的实现:http://code.google.com/p/gaelucene/
There is a GAE-Specific implementation of Lucene: http://code.google.com/p/gaelucene/