从Cocoa应用程序使用Lucene的最好方法是什么? [英] What is the best way to use Lucene from a Cocoa app?

查看:194
本文介绍了从Cocoa应用程序使用Lucene的最好方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有兴趣使用来自Cocoa应用程序的Lucene。我知道有很多方法可以做到这一点,但我的问题是,哪种方式是最好的?我的调查到目前为止:

I'm interested in working with Lucene from a Cocoa application. I'm aware that there are many ways to do this, but my question is, "which way is best?" My investigations so far:

LuceneKit是Lucene的Objective-C端口,但是基于Lucene的一个版本,这是一个古老的点,它,我已经遇到了几个主要问题从去。 (NSDate的不正确的子类;在Luke中工作的基本查询不能与LuceneKit一起使用;)它似乎是一个非初始的。

LuceneKit is an Objective-C port of Lucene, but is based on a version of Lucene that is ancient at this point, and in trying to use it, I've run into several major issues from the get go. (Improper subclass of NSDate; A basic query that works in Luke doesn't work with LuceneKit;) It appears to be a non-starter.

CLucene看起来像是可行的,但它失败了一堆它自己的构建测试,包括一个间歇性并发相关的问题,其中一半的时间我运行测试他们死锁。不鼓舞人心。这仍然可能是答案,但我非常紧张考虑我的经验只是建立它和运行自己的测试。

CLucene looked like it might be viable, but it fails a bunch of it's own tests on build, including an intermittent concurrency related problem where half the time I run the tests they deadlock. Not inspiring. This still may be the answer, but I'm very nervous considering my experience just building it and running its own tests.

当前Apache Lucene通过JNI - 从来没有调用一个来自C的Java库,我不确定这里涉及到了什么。我当然觉得Lucene的官方Apache-curated的化身很可能是最成熟和功能的,但是没有做过C&Java Java JNI的事情,我不清楚如何与工作相比CLucene。

Current Apache Lucene via JNI - Having simply never called a Java library from C, I'm unsure what's involved here. I certainly feel like the official Apache-curated incarnation of Lucene is likely to be the most mature and functional, but having not done the C <-> Java JNI thing before, I'm unclear how the effort involved would compare to working with CLucene.

也许还有其他选择。我不一定寻找一个一流的Objective-C接口(虽然我不会把一个下来,只是一些功能和希望相当成熟和合理的性能。任何人都有任何贤哲建议?

Maybe there are other options. I'm not necessarily looking for a first-class Objective-C interface (although I wouldn't turn one down, either) just something functional and hopefully reasonably mature and reasonably performant. Anyone have any sage advice?

推荐答案

根据我使用JNI的经验(虽然不是Lucene)

From my experience using JNI (although, not with Lucene), it's not too tricky to get something simple working, but you can wind up writing a lot of fairly monotonous code wiring everything up.

另一个你可能想要考虑的选项是 JCC ,由PyLucene项目使用它来生成一个样板C ++环绕JNI itnerface,然后他们使用以包装一个Python API。

Another option you may want to consider is JCC, which is used by the PyLucene project to generate a boilerplate C++ wrapping around the JNI itnerface, which they then use to wrap a Python API around.

这篇关于从Cocoa应用程序使用Lucene的最好方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆