Using CLucene vs java lucene
Asked Answered
H

3

9

I am currently using Java lucene for one of the project and getting OK kind of performance. I am looking for C/C++ option for lucene and came across CLucene on sourceforge.

But I wanted to check if CLucene is as stable and reliable as Java lucene and having all features supported by Java Lucene, also is it apache licensed and actively supported ? if YES why I dont have option to download CLucene on apache Lucene site (on apache lucene site I have lucene.net option though).

Would like to understand more on usage of CLucene for enterprise software.

Heinrike answered 17/2, 2012 at 7:27 Comment(0)
L
16

CLucene is available under the Apache License v2.0 and is hosted at sourceforge. It is not downloadable from Lucene website because CLucene is an independant project. However, Lucy, which is a C port of Lucene (targetting dynamic languages), is available from Lucene website because it is a sub-project of Lucene. Same applies for Lucene.NET.

Unless you are forced not to use a JVM language, I would recommend you use the Java version.

All developments are done for the Java version and then sometimes backported to other ports such as CLucene. As a consequence, lots of useful features are still only available in the Java version (for example function queries are not available in CLucene).

Regarding performance, C/C++ might sometimes be faster than Java, but there are a lot of pieces of code in the Java version which use very neat algorithms to improve performance, such as:

Last but not least, the Java version is the most tested one and used in a lot of very high-traffic websites such as LinkedIn or Twitter.

Leduc answered 17/2, 2012 at 15:41 Comment(3)
Lucene.Net and Lucy are standalone projects now. Lucy is not faster than Java Lucene in many cases and it is not designed to be index compatible (ie an index you created with java lucene will not run with Lucy) - that's directly from Lucy's website incubator.apache.org/lucyDemonology
Unfortunately lucene is not embeddable into another program. A full text index is very useful in a lot of programs.Sachiko
Project Lucy has retired. For details please refer to its Attic page (attic.apache.org/projects/lucy.html)Dyslalia
P
10

CLucene is stable and reliable, and under the same license as the Java version (ASL). It is not linked from the Apache websites as this project is not under the ASF umbrella.

CLucene is line-by-line port of Java Lucene, and being native code (not running on a VM and doing it's own memory allocs/deallocs among other things) it is usually faster than Java Lucene. Some benchmarks (a bit old now tho) show that. Being an exact port, it is 100% compatible with Java Lucene indexes and vice versa.

The only drawback to using CLucene is it is not completely up to date with the current Lucene version.

Phylloxera answered 18/2, 2012 at 17:21 Comment(3)
cLucene page says either use more stable version with older(1.9.1) api or a newer but potentially less reliable from the head. Would you know how unstable is head? Also, I didn't see any page about who is using cLucene. Would you know?Darrow
The 2.3.2 release is stable, its been at least 1-2 years since I was actively involved with development on this projectPhylloxera
"Not completely up to date" in an understatement; the current version of Java Lucene is 6.2.1, whereas the latest CLucene version is based on Java Lucene 2.3.2. Furthermore, the last CLucene release was over 3 years ago. Without some serious sponsorship, as it stands right now, there seems to be no way to catch up with the Java version.Plasmagel
C
2

The latest version for Lucene is 5.2 and significant changes have been made to the index file format since 2.3.2, listed at https://lucene.apache.org/core/5_2_1/core/org/apache/lucene/codecs/lucene50/package-summary.html#package_description. I don't believe there is anything else available that is more updated than CLucene. As for Lucy the website states that: the two libraries are not compatible in terms of either file format or API, and there are no plans to establish such compatibility.

Covet answered 15/7, 2015 at 23:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.