Help

Inactive Bloggers

You can now upgrade to Version 5.0.0.Beta3 of Hibernate Search, and benefit from the following improvements:

Indexing Performance

We did some further polishing of the shiny new backend improvements introduced by last week. I would be really happy to get some feedback on this, as you should be able to get a very significant performance boost on index writing - whatever the storage technology you're using. We're preparing some large scale tests, but the environments we can test on are limited so I'd be happy if you could send us a note on what your experience with it looks like.

The new design should have a significant improvement in throughput, but also requires less locking, needs less threads and will result into less pressure on GC as it has a lower allocation rate.

JDK9 compatibility

We now have continuous integration running for Java 9 (preview builds) running as well. Except the OSGi integration tests running in Apache Karaf, everything else seems to work fine.

API changes

We're now polishing the API, and it's possible that this might be the last Beta. Two very frequently used interfaces were renamed; please don't miss the Migration Guide.

As always, looking forward for your experience with it! ideas and suggestions on the mailing list or via IRC.

Sanne

I am happy keep the Hibernate Search 5 release train rolling by announcing Hibernate Search 5.0.0.Beta2. Download it from the JBoss Maven Repository using the GAV org.hibernate:hibernate-search:5.0.0.Beta2 or from SourceForge. The full change log is available via the JIRA release notes.

As Sanne mentioned on the Beta1 release blog, it is all about getting the final release of Search 5 over the finish line. The resolved issues are mostly minor and center around polishing API and documentation. In particular the geospatial support got a bit of an overhaul. One issue, however, stands out of the crowd - HSEARCH-1699. It deals with how synchronous index updates are applied. You as user are probably only interested in the indexing performance you gain (our initial tests show they are considerable and we will follow up with some numbers). Still, in case you want to know more, refer to the JIRA issue which outlines the gory details.

Make your voice heard and give us your feedback, for example via the mailing list or on IRC.

Enjoy!

For more information, please see:

Most changes applied to both versions. Of note are:

  • HHH-9312 fixed a database connection leak with JTA transaction tracking caused by a transaction timeout detected by a background thread with the transaction rolled back immediately; the background thread was not closing the database connection when Synchronization.afterCompletion(int status) was called; instead, the database connection was not closed until the next application request that used the affected Hibernate session.
  • HHH-9387, HHH-9389, and HHH-9390 fixed some bugs in generated table and foreign key column names for collections when JPA annotations were used. Because these fixes could break existing applications (that rely on the incorrectly generated table and column names) they are not fixed by default. A new API (NamingStrategyDelegator) was added (HHH-9388) to enable these fixes because the NamingStrategy API was too inflexible to allow making changes without causing regressions when a custom NamingStrategy is used. NamingStrategy has been deprecated (HHH-7079 in favor of this new API. Documentation for the NamingStrategyDelegator API has not been added to the manual yet, and the API is not supported in the standalone schema tools yet. Both will be added in 4.3.8 and 4.2.17. For now, you can see details about enabling the fix in the Jira issues.
  • HHH-9305 fixed various bugs in SQL generated for HQL queries that contain an implicit join. The following are examples of HQL affected by this bug are:
       // e.department is implicitly joined in the "select" clause, and is explicitly joined in the "from" clause
       select e.department from Employee e inner join e.department

       // a.zoo is implicitly joined in the "select", "where", and "order by" clauses
       select distinct a.zoo from Animal a where a.zoo is not null order by a.zoo.name

There were several fixes made to 4.3.7 (only):

  • HHH-8839 fixed a bug that caused an IllegalStateException when rendering the SQL for loading an entity with an eager map having an entity key.
  • HHH-8895 fixed a bug that caused a SQLGrammarException when enabling a filter that is defined on a @MappedSuperclass hierarchy because the filter condition was getting applied to all tables in the hierarchy, instead of just one where the filter is defined.
  • HHH-3868 fixed a bug that caused NullPointerException when merging an entity Merging transient entity with an @Embeddable property containing a @org.hibernate.annotations.Parent mapping.

JBoss Nexus: https://repository.jboss.org/nexus/content/groups/public/org/hibernate
Maven Central: http://repo1.maven.org/maven2/org/hibernate/hibernate-core (should update in a couple of days)

SourceForge: https://sourceforge.net/projects/hibernate/files/hibernate4
4.3.7.Final Downloads: 4.3.7.Final ZIP, 4.3.7.Final TGZ
4.2.16.Final Downloads: 4.2.16.Final ZIP, 4.2.16.Final TGZ

Version 5.0.0.Beta1 of Hibernate Search is now available for download!

This summer we've been slower than expected, and based on your feedback we decided that some features that we wished to have in the 5.0 release are going to be moved to future 5.x releases: the current codebase supports latest Apache Lucene 4 since a while and we believe it's in excellent shape already, so we're aiming now at a fast feedback loop to release a 5.0.0.Final in 4-6 weeks.

So in the following weeks we're going to aim at:

  • last needed future-proofing API changes to make it possible to introduce the postponed features without (hopefully) affecting public API down the road of the 5.x cycle,
  • polish documentation
  • react on your feedback!

Noteworthy changes

Those looking at our detailed changelogs might have seen a log of small changes, apparently not too interesting.. that's because we've been working closely with the Infinispan team and some great improvements are being introduced disguised as a simple micro version update of our dependencies.

Significant performance improvements: Async backend

The new async backend is various orders of magnitude more efficient than the previous one! If you are an async user, you will love the new design. Also, while the previous implementation was simply async and wouldn't give any timing guarantees, now we expose a new configuration property index_flush_interval which could make it possible for many more systems to use the async backend: you can decide to have it flush for example every 5 minutes, so to not have a big performance penalty on writes and guarantee that new items are visible in approximately 5 minutes.

The performance benefit of this backend is extremely high, and we're looking forward to apply the same principles for the sync backend too; in case you're interested, the design is described at HSEARCH-1699.

Infinispan integration improvements

With the Infinispan team we've worked on several areas:

Infinispan Directory

Was updated to latest Apache Lucene 4.10 and it is now significantly more reliable: we could finally resolve all known issues and added lots of new tests, and a lot of work on performance was done as well.

Infinispan Query

Infinispan includes a Query module which exposes Hibernate Search 5 capabilities to all Infinispan users: if you know how to use Hibernate Search with a regular Hibernate ORM application (JPA), it will be very easy for you to learn how to use the full-text capabilities of Infinispan Query. Of course this last release 5.0.0.Beta1 is included in Infinispan 7.

WildFly modules for Infinispan integration

The Infinispan project now also provides a nice to use pre-packaged zip file with all modules you might need to copy into WildFly 8, and we've been working together to make sure that Hibernate Search can use these latest modules rather than the ones included by the container: that would allow you to immediately benefit from all new features, and generally speaking not be constrained by the versions of Infinispan that the container might be having at any point in time. This subject is still work in progress, in particular better documentation is needed but essentially you just need to download and unzip the modules package from both projects.

Debugging capabilities

Apache Lucene has the notion of an InfoStream, which outputs lots of detailed information about index writing to the console. Via HSEARCH-1658 you can now configure Hibernate Search to capture all those details and forward it to your logging stream: see also Troubleshooting: enable Lucene’s Infostream in the Lucene configuration chapter of the documentation.

Critical issue resolved in the Avro based serializer

Early alpha versions of Hibernate Search 5 were affected by a critical threadsafety issue in the code managing the Serializer service based on Apache Avro, making it essentially unusable except in trivial unit tests. This is now resolved, and does not affect any (older) stable release.

Avro protocol: version bumped

The serializer backend based on Avro is now able to transmit Flush commands as well; this is mostly to allow transparent improvements but as a user you need to keep in mind that you'd need to upgrade a master node first, as older master nodes will not be able to decode messages sent by this new version of Hibernate Search.

Evolution of the @ContainedIn annotation

This annotation used to be simply a counter-part of @IndexedEmbedded, but as discussed on HSEARCH-1580 it is useful as well to define any other form of indexing dependency. This did work in the past, but was unintentional and therefore broken during recent development, so now the functionality is restored and we're making it an intentionally supported feature.

Thanks Guillaume Smet, for both bringing it up and providing the patches!

Component upgrades

This version was built and tested against Hibernate ORM 4.3.7.Final, JGroups 3.6.0.Final, Infinispan 7.0.0.CR2, WildFly 8.1.0.Final, Apache Lucene 4.10.1.

Feedback needed!

Please try it out and let us know if you have any trouble with it, or if any part of the documentation is not clear enough. As always, we'll be monitoring the Forums, the Mailing Lists, and StackOverflow if you use tag hibernate-search.

We are getting closer to a final release and this version is mainly about improving general performance and reducing the amount of round trips to the datastore. We also added optimistic locking support for datastores which provide atomic find-and-update operations.

We also worked on several bug fixes and improvements under the hood, you can read more about it in the release note.

Optimistic locking detection

With Hibernate ORM, you can add optimistic locking capability to an entity using the @Version annotation:


@Entity
public class Flight implements Serializable {
...
    @Version
    @Column(name="OPTLOCK")
    public Integer getVersion() { ... }
} 


So far Hibernate OGM’s support for this was limited to CouchDB, which has its own proprietary optimistic locking mechanism. In this release we added support for optimistic locking also for those datastores that provide atomic find-and-update semantics such as MongoDB.

As always, you can either download a release bundle from SourceForge or get the JARs from the JBoss Nexus repository server using Maven, Gradle etc. The GAV coordinates are:

  • org.hibernate.ogm:hibernate-ogm-core:4.1.0.Beta8 for the OGM engine and
  • org.hibernate.ogm:hibernate-ogm-<datastore>:4.1.0.Beta8, depending on the backend you want to use.

What's next?

We are currently focused is on improving performance, documentation, polishing the API and fixing last minute bugs.

You're very welcome to raise your voice on the mailing list, ask questions in the forum or report any bugs or feature requests in the issue tracker.

Showing 1 to 5 of 1225 blog entries