Hibernate Search is a full-text search engine for your persistent domain model.
The Hibernate Search team is really proud to announce version 4.1. It has been a long road, but the final result includes many improvements and new features. As usual, a big thanks to our community and our contributors. What's in there for you?
Conditional indexing
We have added interceptors that let you control whether or not a given entity instance is indexed based on its state. This is very useful to implement things like:
- soft deletes
- indexing an entity only if in a given state, for example only index PUBLISHED blogs
Not only does it make your index smaller and thus faster but Hibernate Search is not triggered unless indexing is happening. Read more.
Faster, lighter indexing
We have improved indexing of associations to embed only required information (we were a bit generous before).
In the same vein, you can now define which specific path of an association you want indexed (for further querying). Instead of indexing all of the associated object(s), Hibernate Search will only index the specific path(s). This makes for much faster indexing and smaller indexes. Read more.
Clustering
We have improved the JGroups backend to use a single channel (roughly a single connection between nodes). This makes the bootstrap faster but more importantly simplifies greatly the configuration. Simpler is better as far as we are concerned :) Read more.
Compatibility
Hibernate Search is compatible with Hibernate ORM 4.1 and has been tested on JBoss AS 7.1. We have also upgraded the following main libraries: Lucene to 3.5, JGroups to 3 and Infinispan to 5.1.
We have improved support for modular environments - thanks for the constant nagging of Ales. We still have some work in this area so stay tuned.
Get the release
Download the release from Sourceforge or via Maven artifacts. And go read the documentation.
If you are migrating from an earlier version, make sure to check our migration guide.
Enjoy
Not currently a great way to swap out Hibernate 4.0.1 which is in AS 7.1.1 Final, so do you know which AS releases will include ORM 4.1 and thus be compatible with Search 4.1?
I'm already noticing that because of the includePaths option, I'm eliminating a lot of ClassBridges in favour of using includePaths.
The version of JBoss AS expected to include Hibernate ORM 4.1 is slated to be 7.2 (see https://issues.jboss.org/browse/AS7-4345). It was originally slated to be 7.1.2, but they decided to not do a 7.1.2.
So you either (1) have to wait for 7.2, (2) swap Hibernate ORM and Search in JBoss yourself, (3) wait for https://issues.jboss.org/browse/AS7-4345 to get pushed and create a hybrid branch for yourself. Those are the options I see.
By using ORM 4.1 for the build it should work with both ORM 4.0 and 4.1: indeed we did it primarily to make sure it will work on AS 7.2 and EAP 6 but we tested it on 7.1.1 as well. If you find any problem, let me know!
Do these instructions help? https://docs.jboss.org/author/display/AS71/JPA+Reference+Guide#JPAReferenceGuide-ReplacingthecurrentHibernate4.0.xjarswithanewerversion
Just as an update I switched to Search 4.1.0 with the ORM in AS 7.1.1 Final and all is working well.
Reindex time for 17K items went from 45 seconds to 11 seconds.
Nice!
i notice many of the required jars packaged up are quite old now and some of them are beta. it woudl be good to clean this up and at lease move away from beta jars. in particular i refer to snappy and apis
I use hibernate4.1 find “No suitable driver found for jdbc” err,but use hibernate3 is ok,why?