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 saisantoshi <sa...@gmail.com> on 2013/01/09 20:04:58 UTC

Upgrade Lucene to latest version (4.0) from 2.4.0

We have an existing application which uses Lucene 2.4.0 version. We are
thinking of upgrading it to alatest version (4.0). I am not sure the process
involved in upgrading to latest version. Is it just copying of the jars? If
yes, what are all the jars that we need to copy over. Will it be backward
compatible? Any additional measures we need to take care of?

With version 2.4.0, we have the following jars:
lucene-core-2.4.0.jar
lucene-analyzers-2.4.0.jar

With 4.0:
lucene-analyzers-common-4.0.0.jar
lucene-analyzers-icu-4.0.0.jar
lucene-core-4.0.0.jar

Any advise on this is much appreciated?

Thanks,
Sai.




--
View this message in context: http://lucene.472066.n3.nabble.com/Upgrade-Lucene-to-latest-version-4-0-from-2-4-0-tp4031956.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

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


Re: Upgrade Lucene to latest version (4.0) from 2.4.0

Posted by Glen Newton <gl...@gmail.com>.
I am in the process of upgrading LuSql from 2.x to 4.x and I am first
going to 3.6 as the jump to 4.x was too big.
 I would suggest this to you. I think it is less work.
Of course I am also able to offer LuSql to 3.6 users, so this is
slightly different from your case.

-Glen

On Wed, Jan 9, 2013 at 4:58 PM, saisantoshi <sa...@gmail.com> wrote:
> Are there any best practices that we can follow? We want to get to the latest
> version and am thinking if we can directly go from 2.4.0 to 4.x (as supposed
> to 2.x - 3.x and 3.x - 4.x)? so that it will not only save time but also
> testing cycle at each migration hop.
>
> Are there any limitations in directly upgrading from 2.x - 4.x? Is this
> allowed?
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Upgrade-Lucene-to-latest-version-4-0-from-2-4-0-tp4031956p4032038.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>



-- 
-
http://zzzoot.blogspot.com/
-

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


Re: Upgrade Lucene to latest version (4.0) from 2.4.0

Posted by Naresh <nn...@gmail.com>.
NRT search (http://wiki.apache.org/lucene-java/NearRealtimeSearch)

On Sat, Jan 12, 2013 at 6:50 AM, saisantoshi <sa...@gmail.com>wrote:

> I was just going through compiling our sources against 4.0 and it seems
> there
> are quite some API changes. Any major functionality changes from 2.4 - 4.0?
> with respect to indexing/searching.
>
> Thanks,
> Sai.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Upgrade-Lucene-to-latest-version-4-0-from-2-4-0-tp4031956p4032667.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


-- 
Regards
Naresh

Re: Upgrade Lucene to latest version (4.0) from 2.4.0

Posted by saisantoshi <sa...@gmail.com>.
I was just going through compiling our sources against 4.0 and it seems there
are quite some API changes. Any major functionality changes from 2.4 - 4.0?
with respect to indexing/searching.

Thanks,
Sai.



--
View this message in context: http://lucene.472066.n3.nabble.com/Upgrade-Lucene-to-latest-version-4-0-from-2-4-0-tp4031956p4032667.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

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


Re: Upgrade Lucene to latest version (4.0) from 2.4.0

Posted by saisantoshi <sa...@gmail.com>.
Thanks for all the responses.

Apart from the API changes, is there any major functionality change from
2.4.0 -> 4.x version. I know we need to modify the API to the latest version
but just curious if we need to be aware of any functional changes so as to
do more thorough testing?

Thanks,
Sai. 



--
View this message in context: http://lucene.472066.n3.nabble.com/Upgrade-Lucene-to-latest-version-4-0-from-2-4-0-tp4031956p4032420.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

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


Re: Upgrade Lucene to latest version (4.0) from 2.4.0

Posted by Steve Rowe <sa...@gmail.com>.
Of course you're free to do as you like - who will stop you? :)

The problem is the lack of a single place to look for detailed guidance on handling a long-distance upgrade like that.

But it's difficult to generalize here: the possible range in the level of difficulty involved is vast, depending on the amount of code involved, what parts of the API are being used, etc.  

On Jan 9, 2013, at 4:58 PM, saisantoshi <sa...@gmail.com> wrote:

> Are there any best practices that we can follow? We want to get to the latest
> version and am thinking if we can directly go from 2.4.0 to 4.x (as supposed
> to 2.x - 3.x and 3.x - 4.x)? so that it will not only save time but also
> testing cycle at each migration hop.
> 
> Are there any limitations in directly upgrading from 2.x - 4.x? Is this
> allowed?
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Upgrade-Lucene-to-latest-version-4-0-from-2-4-0-tp4031956p4032038.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> 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


Re: Upgrade Lucene to latest version (4.0) from 2.4.0

Posted by saisantoshi <sa...@gmail.com>.
Are there any best practices that we can follow? We want to get to the latest
version and am thinking if we can directly go from 2.4.0 to 4.x (as supposed
to 2.x - 3.x and 3.x - 4.x)? so that it will not only save time but also
testing cycle at each migration hop.

Are there any limitations in directly upgrading from 2.x - 4.x? Is this
allowed?



--
View this message in context: http://lucene.472066.n3.nabble.com/Upgrade-Lucene-to-latest-version-4-0-from-2-4-0-tp4031956p4032038.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

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


Re: Upgrade Lucene to latest version (4.0) from 2.4.0

Posted by "Igal @ getRailo.org" <ig...@getrailo.org>.
as mentioned before -- I'm not an expert on Lucene (far from it) -- but 
it seems to me like each migration version will take almost equal amount 
of work so if I were you I'd rethink this plan and consider migration to 4.0


Igal


On 1/9/2013 1:08 PM, saisantoshi wrote:
> Is there any migration guide from 2.x to 3.x? ( as per the suggestion, i
> would like to upgrade first from 2.4.0 to 2.9.0 and from 2.9.0 to 3.6) and
> later we decide if we want to upgrade from 3.6 to 4.x version?
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Upgrade-Lucene-to-latest-version-4-0-from-2-4-0-tp4031956p4032029.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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


Re: Upgrade Lucene to latest version (4.0) from 2.4.0

Posted by Steve Rowe <sa...@gmail.com>.
I don't think there is a migration guide from 2.X to 3.X, other than the specific information in the release notes.

If you start reading CHANGES.txt at version 3.0.0, and then each later release's notes after that, especially the sections "Changes in backwards compatibility policy", e.g. for 3.0.0: <http://lucene.apache.org/core/4_0_0/changes/Changes.html#3.0.0.changes_in_backwards_compatibility_policy>, and "API Changes", you'll get a good picture of the changes you need to make to your code.

On Jan 9, 2013, at 4:08 PM, saisantoshi <sa...@gmail.com> wrote:

> Is there any migration guide from 2.x to 3.x? ( as per the suggestion, i
> would like to upgrade first from 2.4.0 to 2.9.0 and from 2.9.0 to 3.6) and
> later we decide if we want to upgrade from 3.6 to 4.x version?
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Upgrade-Lucene-to-latest-version-4-0-from-2-4-0-tp4031956p4032029.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> 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


Re: Upgrade Lucene to latest version (4.0) from 2.4.0

Posted by saisantoshi <sa...@gmail.com>.
Is there any migration guide from 2.x to 3.x? ( as per the suggestion, i
would like to upgrade first from 2.4.0 to 2.9.0 and from 2.9.0 to 3.6) and
later we decide if we want to upgrade from 3.6 to 4.x version?



--
View this message in context: http://lucene.472066.n3.nabble.com/Upgrade-Lucene-to-latest-version-4-0-from-2-4-0-tp4031956p4032029.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

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


Re: Upgrade Lucene to latest version (4.0) from 2.4.0

Posted by Steve Rowe <sa...@gmail.com>.
Sai,

For the transition from 2.X to 3.X, I recommend compiling your code against the latest 2.9.X version (2.9.4), looking at the deprecation messages, and making changes until these are all addressed and compilation no longer produces deprecation messages.  Once that's done, your code should compile against 3.0.X.

Unlike the 2.X->3.X transition, there was no "bridge" version that simplifies the upgrade path from 3.X->4.0.  However, MIGRATE.txt contains a detailed list of upgrade notes from 3.X to 4.0.  See below for an HTML version of this file, called the "Migration Guide".

Check out the 4.0 "Changes" and "Migration Guide" (under "Reference Documents"): 

    <http://lucene.apache.org/core/4_0_0/index.html> 

(note that the 4.0 Changes page contains release notes for *all* previous versions.)

Steve

On Jan 9, 2013, at 2:21 PM, saisantoshi <sa...@gmail.com> wrote:

> Thanks. Could you please elaborate on what is needed other than replacing the
> jars? Are the jars listed is the only jars or any additional jars required?
> 
> Is the API not backward compatible? I mean to say whatever the API calls we
> are using in 2.4.0 is not supported by 4.0? Has the signature modified in
> 4.x version?
> 
> Thanks,
> Sai.
> 
> 
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Upgrade-Lucene-to-latest-version-4-0-from-2-4-0-tp4031956p4031974.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> 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


RE: Upgrade Lucene to latest version (4.0) from 2.4.0

Posted by Paul Hill <pa...@metajure.com>.
My guess is that upgrading to 3.6 to cover the _mostly_ upward compatible changes to that point (Fieldable vs. Field) might make a worthwhile intermediate step.

Then test that to make sure it is working using whatever have to test. Then work out the "real" changes to 4.0.
That is only a thought, because I haven't upgraded to 4.0 yet.

-Paul

> -----Original Message-----
> From: Igal Sapir [mailto:igal@getrailo.org]
> Sent: Wednesday, January 09, 2013 11:42 AM
> To: java-user@lucene.apache.org
> Subject: Re: Upgrade Lucene to latest version (4.0) from 2.4.0
> 
> I can not elaborate much myself add there are many changes and I'm not an expert on License.
> 
> I can tell you though that many signatures have changed as well as package names.
> 
> There were many API changes even between 3.6 and 4.0
> 
> --
> typos, misspels, and other weird words brought to you courtesy of my mobile device.
> On Jan 9, 2013 11:21 AM, "saisantoshi" <sa...@gmail.com> wrote:
> 
> > Thanks. Could you please elaborate on what is needed other than
> > replacing the jars? Are the jars listed is the only jars or any
> > additional jars required?
> >
> > Is the API not backward compatible? I mean to say whatever the API
> > calls we are using in 2.4.0 is not supported by 4.0? Has the signature
> > modified in 4.x version?
> >
> > Thanks,
> > Sai.
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> > http://lucene.472066.n3.nabble.com/Upgrade-Lucene-to-latest-version-4-
> > 0-from-2-4-0-tp4031956p4031974.html
> > Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > 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


Re: Upgrade Lucene to latest version (4.0) from 2.4.0

Posted by Igal Sapir <ig...@getrailo.org>.
I can not elaborate much myself add there are many changes and I'm not an
expert on License.

I can tell you though that many signatures have changed as well as package
names.

There were many API changes even between 3.6 and 4.0

--
typos, misspels, and other weird words brought to you courtesy of my mobile
device.
On Jan 9, 2013 11:21 AM, "saisantoshi" <sa...@gmail.com> wrote:

> Thanks. Could you please elaborate on what is needed other than replacing
> the
> jars? Are the jars listed is the only jars or any additional jars required?
>
> Is the API not backward compatible? I mean to say whatever the API calls we
> are using in 2.4.0 is not supported by 4.0? Has the signature modified in
> 4.x version?
>
> Thanks,
> Sai.
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Upgrade-Lucene-to-latest-version-4-0-from-2-4-0-tp4031956p4031974.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: Upgrade Lucene to latest version (4.0) from 2.4.0

Posted by saisantoshi <sa...@gmail.com>.
Thanks. Could you please elaborate on what is needed other than replacing the
jars? Are the jars listed is the only jars or any additional jars required?

Is the API not backward compatible? I mean to say whatever the API calls we
are using in 2.4.0 is not supported by 4.0? Has the signature modified in
4.x version?

Thanks,
Sai.





--
View this message in context: http://lucene.472066.n3.nabble.com/Upgrade-Lucene-to-latest-version-4-0-from-2-4-0-tp4031956p4031974.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

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


Re: Upgrade Lucene to latest version (4.0) from 2.4.0

Posted by "Igal @ getRailo.org" <ig...@getrailo.org>.
the API has changed much over time so I suspect that it will take more 
than replacing the jars.


On 1/9/2013 11:04 AM, saisantoshi wrote:
> We have an existing application which uses Lucene 2.4.0 version. We are
> thinking of upgrading it to alatest version (4.0). I am not sure the process
> involved in upgrading to latest version. Is it just copying of the jars? If
> yes, what are all the jars that we need to copy over. Will it be backward
> compatible? Any additional measures we need to take care of?
>
> With version 2.4.0, we have the following jars:
> lucene-core-2.4.0.jar
> lucene-analyzers-2.4.0.jar
>
> With 4.0:
> lucene-analyzers-common-4.0.0.jar
> lucene-analyzers-icu-4.0.0.jar
> lucene-core-4.0.0.jar
>
> Any advise on this is much appreciated?
>
> Thanks,
> Sai.
>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Upgrade-Lucene-to-latest-version-4-0-from-2-4-0-tp4031956.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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


Re: Upgrade Lucene to latest version (4.0) from 2.4.0

Posted by Bin Lan <bl...@perimeterusa.com>.
We recently went through the same process. We upgraded our indexing service
from 1.9.1 to 3.6.1. Unfortunately, the process is not as easy as you
thought. Besides replacing the jar files. You also need to change your code
to adopt to the new API. There are many changes, the most import parts are
in IndexWriter, IndexReader, and IndexSearcher classes.


Regards
--
Bin Lan
Software Developer
Perimeter E-Security
O - (203)541-3412

Follow Us on Twitter: www.twitter.com/PerimeterNews
Read Our Blog: security.perimeterusa.com/blog





On Wed, Jan 9, 2013 at 2:04 PM, saisantoshi <sa...@gmail.com> wrote:

> We have an existing application which uses Lucene 2.4.0 version. We are
> thinking of upgrading it to alatest version (4.0). I am not sure the
> process
> involved in upgrading to latest version. Is it just copying of the jars? If
> yes, what are all the jars that we need to copy over. Will it be backward
> compatible? Any additional measures we need to take care of?
>
> With version 2.4.0, we have the following jars:
> lucene-core-2.4.0.jar
> lucene-analyzers-2.4.0.jar
>
> With 4.0:
> lucene-analyzers-common-4.0.0.jar
> lucene-analyzers-icu-4.0.0.jar
> lucene-core-4.0.0.jar
>
> Any advise on this is much appreciated?
>
> Thanks,
> Sai.
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Upgrade-Lucene-to-latest-version-4-0-from-2-4-0-tp4031956.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>




This message is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information of Perimeter Internetworking Corp.  Any unauthorized review, use, copying, disclosure, or distribution is prohibited.  If you are not the intended recipient, please immediately contact the sender by reply email and delete all copies of the original message.



--
 The sender of this email subscribes to Perimeter E-Security's email
 anti-virus service. This email has been scanned for malicious code and is
 believed to be virus free. For more information on email security please
 visit: http://www.perimeterusa.com/services/messaging
 This communication is confidential, intended only for the named recipient(s)
 above and may contain trade secrets or other information that is exempt from
 disclosure under applicable law. Any use, dissemination, distribution or
 copying of this communication by anyone other than the named recipient(s) is
 strictly prohibited. If you have received this communication in error, please
 delete the email and immediately notify our Command Center at 203-541-3444.

RE: Upgrade Lucene to latest version (4.0) from 2.4.0

Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi,

why do you try to configure the IndexWriter with outdated merge policies and lots of custom settings for buffering? I would start without any such settings and use IndexWriter with plain default settings. If I hit issues, then it may be useful to change merging and buffering settings. It looks like you prevented IndexWriter from merging at all. This of course would make queries slow, because you have way too many index segments (CFS files).

If you upgrade from very old Lucene versions, it is wise to remove any customizations and start with plain default settings.

Uwe

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


> -----Original Message-----
> From: jaga_india [mailto:jaga.alt@gmail.com]
> Sent: Thursday, January 22, 2015 7:20 AM
> To: java-user@lucene.apache.org
> Subject: Re: Upgrade Lucene to latest version (4.0) from 2.4.0
> 
> Hi Sai,
> 
> hopes you have successfully migrated to 4.0
> 
> we also migrating from 2.4 to 4.10, but after updating to 4.10 it is taking more
> time than 2.4.
> I have posted a query , below is the link... help me.
> 
> http://lucene.472066.n3.nabble.com/Multiple-CFS-files-are-generated-in-
> lucene-4-10-2-td4176336.html
> 
> 
> 
> 
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Upgrade-Lucene-to-latest-version-4-0-
> from-2-4-0-tp4031956p4181090.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> 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


Re: Upgrade Lucene to latest version (4.0) from 2.4.0

Posted by jaga_india <ja...@gmail.com>.
Hi Sai,

hopes you have successfully migrated to 4.0

we also migrating from 2.4 to 4.10, but after updating to 4.10 it is taking
more time than 2.4. 
I have posted a query , below is the link... help me.

http://lucene.472066.n3.nabble.com/Multiple-CFS-files-are-generated-in-lucene-4-10-2-td4176336.html




--
View this message in context: http://lucene.472066.n3.nabble.com/Upgrade-Lucene-to-latest-version-4-0-from-2-4-0-tp4031956p4181090.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

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