tags:

views:

136

answers:

1

I have been looking at upgrading from 2.4 to 2.9 and noticed all the contrived code that handles attributes. Just wondering if anyone has any opinions if this will change given its a .9 and things will change when 3.0 is out.

I am confused how creating attributes by reflection and stashing attributes in a map can be as performant as just having the fields for each of the attribute types.

Is it worth upgrading today to 2.9 or just wait for 3.0 when things are finalized. For me its not essential to upgrade today.

+1  A: 

"When things are finalized" isn't really an accurate summary of Lucene 3.0 vs 2.9. The 2.9 release contains all the same updates and API changes as 3.0.

All the new features were added to 2.4, the release was numbered 2.9 (to make it clear that it was a 'special' release), and 3.0 just comes along and removes two of the things which were 'holding things back': namely, it will remove all the deprecated methods and classes (many of which have been hanging around for a LONG time), and the requirement for Java 1.4 compatibility will be dropped (so Java 1.5-level classes, generics, etc will be introduced as appropriate).

Basically, rather than doing a huge leap in both API breakage and features in a single release (meaning people who wanted the features had to change all their old deprecated calls), the features were added first, so people can take advantage of the changes, and then concentrate on removing the use of the deprecated APIs, knowing that 3.0 will basically be a drop-in replacement -- just cleaned up, with no new real features.

Cowan
Its just the new TokenStream API in 2.9 and 3.0 is so ugly. Given the whole mantra of TokenStreams is about speed, how can using a Map and so all the factory stuff in the new attribute support help ?
mP
I understand some of the motivations for the 2.9 release and how if you upgrade your problems code to work you will be fine when the official 3.0 comes out you will be ready. However from s very quick look and without measuring I find it hard to believe maps of attributes can be faster than simple value types. Comments ???
mP