lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: Java8 and lucene version
Date Thu, 07 May 2015 09:00:37 GMT
Hi,

There are two things to take into account:

Building with Java 8:
- many tests don't even pass with Java 7, because the order of reflected methods is not the
same as in source code. Also some tests of Solr relied on order of hash maps which changed
with Java 8 (this also affects early Lucene/Solr 3 versions). These were "wrong assumptions"
about how the JVM behaves, which changed with Java 7 and Java 8.
- Lucene 2.9 is based on Java 1.4, so the build system passes "-source / -target 1.4" to the
compiler, which is no longer supported in Java 8. So you cannot compile and test it without
changing the build system. You have to build it with earlier versions.

Running with Java 8 (with precompiled binaries from Maven Central or the binary downloads):
It should work with Java 8, but you should in any case test it. One example that uses Lucene
3.3.0 (a bit newer, based on Java 5) is "Atlassian JIRA". This one works perfectly fine with
Java 8!

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Erick Erickson [mailto:erickerickson@gmail.com]
> Sent: Thursday, May 07, 2015 4:59 AM
> To: java-user
> Subject: Re: Java8 and lucene version
> 
> I'd just grab the source, build it and run the tests. WARNING: this is so old
> that I don't have much experience with it...
> 
> Short form:
> Check out the code, something like: svn checkout
> https://svn.apache.org/repos/asf/lucene/java/tags/lucene_2_9_4
> lucene_2_9_4
> build it by going to the directory lucene_2_9_4 (or thereabouts) and execute
> the target "ant test". See what happens.
> 
> But this is largely uncharted waters, so you're mostly on your own.
> 
> Best,
> Erick
> 
> 
> On Wed, May 6, 2015 at 7:47 PM, Jason Wee <peichieh@gmail.com> wrote:
> > The difficult way is to go through lucene code and read if is work
> > with java 8. If you can duplicate the index created with lucene 2.9.4,
> > perhaps you can try to upgrade java in test environment, it should
> > give some direct indication or result (for example, exception, index
> > cannot write/read, etc) immediately.
> >
> > hth
> >
> > jason
> >
> > On Thu, May 7, 2015 at 4:19 AM, Pushyami Gundala
> <pushyami@umich.edu> wrote:
> >
> >> Hi, We are using lucene 2.9.4 version for our application that has search.
> >> We are planning on upgrading our application to run on java 8. My
> >> Question is when we move to java 8 does the lucene-2.9.4 version
> >> still work? or i need to upgrade to new version of lucene  to support  java
> 8.
> >> Regards,
> >> Pushyami
> >>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message