[hibernate-dev] A few questions about Search 5.5.0

Sanne Grinovero sanne at hibernate.org
Sat Sep 19 17:29:01 EDT 2015


On 19 September 2015 at 09:11, Gustavo Fernandes <gustavo at infinispan.org> wrote:
> On Thu, Sep 17, 2015 at 8:43 PM, Guillaume Smet <guillaume.smet at gmail.com>
> wrote:
>
>> Hi,
>>
>> I upgraded our framework to 5.5.0 and I have a few questions about it.
>>
>> ==
>> First, I had to remove the existing indexes otherwise I had exceptions
>> about version of the index. Is this expected? As far as I remember, it's
>> been a long time since we had to remove the indexes after an upgrade.
>>
>> Caused by: org.apache.lucene.index.IndexFormatTooOldException: Format
>> version is not supported (resource
>>
>> BufferedChecksumIndexInput(MMapIndexInput(path="/data/services/test/data/helios/lucene/fr.openwide.helios.core.business.ticket.model.MessageFile/segments_1"))):
>> -11 (needs to be between 1071082519 and 1071082519). This version of
>> Lucene only supports indexes created with release 4.0 and later.
>>
>> Maybe it should be integrated in the blog post that one might need to
>> clean up indexes if they come from before the switch to Lucene 4?
>>
>>
>
> It should be possible to read Lucene 4 indexes from Lucene 5, but you need
> to add the codec in your classpath [1]

I did add it to our Maven dependencies but since I marked it
"optional" I guess it was a bit pointless.

https://github.com/hibernate/hibernate-search/blob/master/pom.xml#L210

But: AFAIR pre-4 support was entirely dropped, this additional
dependency is only useful for indexes created between 4.0 to 5.0. You
never fully rebuilt the indexes since Lucene 3.x?

Sorry for not mentioning this in the migration guide, I forgot but
also I do generally assume that people will need to reindex anyway for
various other reasons.
It's mentioned in the Lucene migration guides though, I'm afraid
you'll need to read both ours and Lucene's; the Lucene team recommends
to use the index updater tool in steps: you should be able to upgrade
a Lucene 3 index to a 4 format using the tool at version 4, then with
Lucene 5 move to the format of 5. There might be other benefits of
upgrading formats.

FTR, I did add the lucene-backward-codecs dependency to he modules
included in Wildfly.

Sanne

>
> Could you give a try and let us know if it works for you?
>
> [1]
> http://repo1.maven.org/maven2/org/apache/lucene/lucene-backward-codecs/5.3.0/
>
> Cheers,
> Gustavo
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev


More information about the hibernate-dev mailing list