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 "Buddhavarapu, Suresh" <su...@emc.com> on 2014/06/16 13:45:36 UTC

RE: Lucene Upgrade from 2.9.x to 4.7.x

I was trying the Demo application from 4.7.2 on an index created by 2.9.1. I get a org.apache.lucene.index.IndexFormatTooOldException exception.
I tried the upgrader tool. Same exception again.

Is there an upgrader tool that can work with a 2.9.1 tool? Or Do I have to build one? Any guidelines would helpful


Thanks,
Suresh

-----Original Message-----
From: Buddhavarapu, Suresh [mailto:suresh.buddhavarapu@emc.com] 
Sent: Friday, May 30, 2014 1:13 PM
To: java-user@lucene.apache.org
Subject: RE: Lucene Upgrade from 2.9.x to 4.7.x

Thanks Xiaolong. Really the item 5 is helpful. 

-----Original Message-----
From: Xiaolong Zheng [mailto:Xiaolong.Zheng@mathworks.com]
Sent: Thursday, May 29, 2014 8:44 PM
To: java-user@lucene.apache.org
Subject: Re: Lucene Upgrade from 2.9.x to 4.7.x

I just upgrade Lucene from 2.0.0 to 4.6.1, here is a list of collections that I was using during the upgrade:


1. Lucene 2.0 API
<http://www.lhelper.org/dev/lucene-2.0.0/docs/api/index.html>
2. Lucene 4.7.2 Core API
<http://lucene.apache.org/core/4_7_2/core/index.html>
3. Lucene 4.7.2 Analyzers-Comon API
<http://lucene.apache.org/core/4_7_2/analyzers-common/index.html?overview-s
ummary.html>
4. Lucene 4.7.2 QueryParser API
<http://lucene.apache.org/core/4_7_2/queryparser/index.html>
5. Lucene Change Log
<http://lucene.apache.org/core/4_7_2/changes/Changes.html>
6. Apache Lucene Migration Guide
<http://lucene.apache.org/core/4_7_2/MIGRATE.html>


I would like to say number 5 is also very helpful.



Thanks,
Xiaolong Zheng






On 5/29/14 9:56 AM, "Buddhavarapu, Suresh" <su...@emc.com>
wrote:

>Hello,
>
>I'm looking for some documents/information on upgrade from Lucene 2.9.x 
>to 4.7.2. This is the first time I'm doing a upgrade. Can someone point 
>me to some help in this?
>Is there a documentation on "what has changed" from 2.9.x to 4.7.2?
>
>Thanks,
>Suresh


---------------------------------------------------------------------
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



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


RE: Lucene Upgrade from 2.9.x to 4.7.x

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

> Thanks Uwe. I tried this path and I do not find any .cfs files.

Lucene 3 and Lucene 4 indexes do not necessarily always contain CFS files, especially not if they are optimized. This depends on the merge policy. The index upgrader uses the default one, which creates no CFS files for the largest segment of an index. As there is only one after the upgrade, it is not in compound format.

> All that I see in my index directory after running upgrader is following files.
>
> -rw------- 1 root root  245 Jun 16 22:38 _1.fdt
> -rw------- 1 root root   45 Jun 16 22:38 _1.fdx
> -rw------- 1 root root 2809 Jun 16 22:38 _1.fnm
> -rw------- 1 root root  487 Jun 16 22:38 _1_Lucene41_0.doc
> -rw------- 1 root root   34 Jun 16 22:38 _1_Lucene41_0.pay
> -rw------- 1 root root 3999 Jun 16 22:38 _1_Lucene41_0.pos
> -rw------- 1 root root 5575 Jun 16 22:38 _1_Lucene41_0.tim
> -rw------- 1 root root  834 Jun 16 22:38 _1_Lucene41_0.tip
> -rw------- 1 root root  110 Jun 16 22:38 _1.nvd
> -rw------- 1 root root  343 Jun 16 22:38 _1.nvm
> -rw------- 1 root root  419 Jun 16 22:38 _1.si

That looks perfectly fine, although the index is very small. This is already the 4.x index - how did the Lucene 3.6 index look like? The size of the index should be in the same magnitude like before the upgrade.

> My search query returns zero object. Can someone help me here. 

The reason for this can be changes in the analysis. Lucene searches only work, if the index and query analysis are compatible, which is not guaranteed with such a gap in Lucene versions. Please make sure that you use same analyzers before and after the upgrade with same matchVersion parameter (in your case you would need to pass Version.LUCENE_2_9 parameter to your analyzer, which is no longer available in Lucene 4). It depends on the behavior anaylyzer that was used before, if it is possible to easily upgrade without reindexing all the data. E.g., StandardAnalyzer changed its behavior to be Unicode conform in Lucene 3.x. This makes it incompatible for some queries, but simple ones still work.

Uwe


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


RE: Lucene Upgrade from 2.9.x to 4.7.x

Posted by "Buddhavarapu, Suresh" <su...@emc.com>.
Thanks Uwe. I tried this path and I do not find any .cfs files.
All that I see in my index directory after running upgrader is following files.

-rw------- 1 root root  245 Jun 16 22:38 _1.fdt
-rw------- 1 root root   45 Jun 16 22:38 _1.fdx
-rw------- 1 root root 2809 Jun 16 22:38 _1.fnm
-rw------- 1 root root  487 Jun 16 22:38 _1_Lucene41_0.doc
-rw------- 1 root root   34 Jun 16 22:38 _1_Lucene41_0.pay
-rw------- 1 root root 3999 Jun 16 22:38 _1_Lucene41_0.pos
-rw------- 1 root root 5575 Jun 16 22:38 _1_Lucene41_0.tim
-rw------- 1 root root  834 Jun 16 22:38 _1_Lucene41_0.tip
-rw------- 1 root root  110 Jun 16 22:38 _1.nvd
-rw------- 1 root root  343 Jun 16 22:38 _1.nvm
-rw------- 1 root root  419 Jun 16 22:38 _1.si


My search query returns zero object. Can someone help me here. 

-Suresh

-----Original Message-----
From: Uwe Schindler [mailto:uwe@thetaphi.de] 
Sent: Monday, June 16, 2014 5:27 PM
To: java-user@lucene.apache.org
Subject: RE: Lucene Upgrade from 2.9.x to 4.7.x

Hi,

You must first download the 3.6.2 Lucene version and upgrade using the upgrade tool from the lucene-core-3.6.2.jar. After this, your index is in Lucene 3.6 format, which can be read with Lucene 4.

Uwe

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


> -----Original Message-----
> From: Buddhavarapu, Suresh [mailto:suresh.buddhavarapu@emc.com]
> Sent: Monday, June 16, 2014 1:46 PM
> To: java-user@lucene.apache.org
> Subject: RE: Lucene Upgrade from 2.9.x to 4.7.x
> 
> I was trying the Demo application from 4.7.2 on an index created by 
> 2.9.1. I get a org.apache.lucene.index.IndexFormatTooOldException exception.
> I tried the upgrader tool. Same exception again.
> 
> Is there an upgrader tool that can work with a 2.9.1 tool? Or Do I 
> have to build one? Any guidelines would helpful
> 
> 
> Thanks,
> Suresh
> 
> -----Original Message-----
> From: Buddhavarapu, Suresh [mailto:suresh.buddhavarapu@emc.com]
> Sent: Friday, May 30, 2014 1:13 PM
> To: java-user@lucene.apache.org
> Subject: RE: Lucene Upgrade from 2.9.x to 4.7.x
> 
> Thanks Xiaolong. Really the item 5 is helpful.
> 
> -----Original Message-----
> From: Xiaolong Zheng [mailto:Xiaolong.Zheng@mathworks.com]
> Sent: Thursday, May 29, 2014 8:44 PM
> To: java-user@lucene.apache.org
> Subject: Re: Lucene Upgrade from 2.9.x to 4.7.x
> 
> I just upgrade Lucene from 2.0.0 to 4.6.1, here is a list of 
> collections that I was using during the upgrade:
> 
> 
> 1. Lucene 2.0 API
> <http://www.lhelper.org/dev/lucene-2.0.0/docs/api/index.html>
> 2. Lucene 4.7.2 Core API
> <http://lucene.apache.org/core/4_7_2/core/index.html>
> 3. Lucene 4.7.2 Analyzers-Comon API
> <http://lucene.apache.org/core/4_7_2/analyzers-
> common/index.html?overview-s
> ummary.html>
> 4. Lucene 4.7.2 QueryParser API
> <http://lucene.apache.org/core/4_7_2/queryparser/index.html>
> 5. Lucene Change Log
> <http://lucene.apache.org/core/4_7_2/changes/Changes.html>
> 6. Apache Lucene Migration Guide
> <http://lucene.apache.org/core/4_7_2/MIGRATE.html>
> 
> 
> I would like to say number 5 is also very helpful.
> 
> 
> 
> Thanks,
> Xiaolong Zheng
> 
> 
> 
> 
> 
> 
> On 5/29/14 9:56 AM, "Buddhavarapu, Suresh"
> <su...@emc.com>
> wrote:
> 
> >Hello,
> >
> >I'm looking for some documents/information on upgrade from Lucene 
> >2.9.x to 4.7.2. This is the first time I'm doing a upgrade. Can 
> >someone point me to some help in this?
> >Is there a documentation on "what has changed" from 2.9.x to 4.7.2?
> >
> >Thanks,
> >Suresh
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 
> ---------------------------------------------------------------------
> 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: Lucene Upgrade from 2.9.x to 4.7.x

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

You must first download the 3.6.2 Lucene version and upgrade using the upgrade tool from the lucene-core-3.6.2.jar. After this, your index is in Lucene 3.6 format, which can be read with Lucene 4.

Uwe

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


> -----Original Message-----
> From: Buddhavarapu, Suresh [mailto:suresh.buddhavarapu@emc.com]
> Sent: Monday, June 16, 2014 1:46 PM
> To: java-user@lucene.apache.org
> Subject: RE: Lucene Upgrade from 2.9.x to 4.7.x
> 
> I was trying the Demo application from 4.7.2 on an index created by 2.9.1. I
> get a org.apache.lucene.index.IndexFormatTooOldException exception.
> I tried the upgrader tool. Same exception again.
> 
> Is there an upgrader tool that can work with a 2.9.1 tool? Or Do I have to build
> one? Any guidelines would helpful
> 
> 
> Thanks,
> Suresh
> 
> -----Original Message-----
> From: Buddhavarapu, Suresh [mailto:suresh.buddhavarapu@emc.com]
> Sent: Friday, May 30, 2014 1:13 PM
> To: java-user@lucene.apache.org
> Subject: RE: Lucene Upgrade from 2.9.x to 4.7.x
> 
> Thanks Xiaolong. Really the item 5 is helpful.
> 
> -----Original Message-----
> From: Xiaolong Zheng [mailto:Xiaolong.Zheng@mathworks.com]
> Sent: Thursday, May 29, 2014 8:44 PM
> To: java-user@lucene.apache.org
> Subject: Re: Lucene Upgrade from 2.9.x to 4.7.x
> 
> I just upgrade Lucene from 2.0.0 to 4.6.1, here is a list of collections that I was
> using during the upgrade:
> 
> 
> 1. Lucene 2.0 API
> <http://www.lhelper.org/dev/lucene-2.0.0/docs/api/index.html>
> 2. Lucene 4.7.2 Core API
> <http://lucene.apache.org/core/4_7_2/core/index.html>
> 3. Lucene 4.7.2 Analyzers-Comon API
> <http://lucene.apache.org/core/4_7_2/analyzers-
> common/index.html?overview-s
> ummary.html>
> 4. Lucene 4.7.2 QueryParser API
> <http://lucene.apache.org/core/4_7_2/queryparser/index.html>
> 5. Lucene Change Log
> <http://lucene.apache.org/core/4_7_2/changes/Changes.html>
> 6. Apache Lucene Migration Guide
> <http://lucene.apache.org/core/4_7_2/MIGRATE.html>
> 
> 
> I would like to say number 5 is also very helpful.
> 
> 
> 
> Thanks,
> Xiaolong Zheng
> 
> 
> 
> 
> 
> 
> On 5/29/14 9:56 AM, "Buddhavarapu, Suresh"
> <su...@emc.com>
> wrote:
> 
> >Hello,
> >
> >I'm looking for some documents/information on upgrade from Lucene 2.9.x
> >to 4.7.2. This is the first time I'm doing a upgrade. Can someone point
> >me to some help in this?
> >Is there a documentation on "what has changed" from 2.9.x to 4.7.2?
> >
> >Thanks,
> >Suresh
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 
> ---------------------------------------------------------------------
> 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