You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Scott Smith <ss...@mainstreamdata.com> on 2009/06/17 00:36:06 UTC
Determining lucene version programmatically
Is there any way to programmatically determine the version of lucene
being loaded?
Re: Determining lucene version programmatically
Posted by Michael McCandless <lu...@mikemccandless.com>.
As of 2.9, org.apache.lucene.util.Constants.LUCENE_VERSION is a good
way to get this.
That constant is set by first looking at the implementation version,
and then making sure the version Lucene thinks it is (2.9 on trunk
now) is contained in the resulting string. It also takes care of a
null implementation version (returning 2.9).
Mike
On Tue, Jun 16, 2009 at 6:36 PM, Scott Smith<ss...@mainstreamdata.com> wrote:
> Is there any way to programmatically determine the version of lucene
> being loaded?
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
RE: Determining lucene version programmatically
Posted by Scott Smith <ss...@mainstreamdata.com>.
Exactly. Thanks.
-----Original Message-----
From: João Silva [mailto:galaio.silva@gmail.com]
Sent: Tuesday, June 16, 2009 4:47 PM
To: java-user@lucene.apache.org
Subject: Re: Determining lucene version programmatically
hi ssmith,
is this what you need?
LucenePackage.get().getImplementationVersion();
cheers,
João
On Tue, Jun 16, 2009 at 11:36 PM, Scott Smith <ss...@mainstreamdata.com>wrote:
> Is there any way to programmatically determine the version of lucene
> being loaded?
>
>
>
>
--
Cumprimentos,
João Carlos Galaio da Silva
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Determining lucene version programmatically
Posted by João Silva <ga...@gmail.com>.
hi ssmith,
is this what you need?
LucenePackage.get().getImplementationVersion();
cheers,
João
On Tue, Jun 16, 2009 at 11:36 PM, Scott Smith <ss...@mainstreamdata.com>wrote:
> Is there any way to programmatically determine the version of lucene
> being loaded?
>
>
>
>
--
Cumprimentos,
João Carlos Galaio da Silva