Help

Inactive Bloggers

Last night we released Hibernate Search 5.2.0.Beta1, and as many users requested we worked on Multi-Tenancy support.

Multi-tenancy

This feature was available since some time in Hibernate ORM, but while Hibernate Search would not prevent you to use it, it wouldn't apply the same strict isolation on full-text queries. This is all implemented now, and is super easy to use.

How to use it

It's not different than any usage of Hibernate ORM's multi-tenancy. After you open a tenant-aware 'Session', changes will be tagged as belonging to a specific tenant automatically. When performing a full-text query, you'll only get results from the current tenant. When rebuilding the index using the MassIndexer, it will rebuild only the index from the current tenant. When performing a purgeAll operation, it will only delete entries which belong to the current tenant.

Implementation and Sharding considerations

In this implementation, as suggested by some of you we didn't create a fully independent index for each tenant, but each Document in the index gets tagged by the tenantid.

I am wondering if we should also implement a variation in which we keep each tenant's data into a fully independent index: please let us know what you think about that. The current approach of a single index works better if you have a very high amount of tenants, as there are practical limits in how many indexes can be managed. Another benefit of the current approach, is that you can easily plug in a clever custom sharding implementation; by working on a modulo approach among a list of tenants, you can tune it for a reasonable level of separation without necessarily having as many indexes as tenants.

Performance on polymorphic entity loading

The performance improvement highlight of the month goes to a revisited strategy on our internal usage of criterias when loading polymorphic results. If you were loading full-text results from a non-trivial class hierarchy you might notice a sweet performance improvement. For more details see HSEARCH-1793.

MassIndexer now supporting a Cancel operation

The async variation of the MassIndexer returns a Future, but this didn't implement the cancel operation. Many thanks to Yoann Gendre for implementing it!

Other improvements

For the list of minor improvements, please refer to the changelog.

Get the update!

Everything you need is available on Hibernate Search's web site. Download the full distribution from here, or get it from Maven Central, and don't hesitate to reach us in our forums.

4.3.9.Final and 4.2.19.Final were released 15/Apr/2015.

4.2.18.Final was actually released 28/Jan/2015. At the time of that release there were problems with in.relation.to. Unfortunately, after those issues were resolved, the announcement for 4.2.18.Final fell through the cracks, so I am covering that release here as well.

4.2.18.Final and 4.2.19.Final fixes several regressions. Those fixes were also included in 4.3.9.Final.

4.3.9.Final includes mainly bugfixes with some improvements:

  • improved support for AttributeConverters (backported from 5.0.0.Beta1);
  • EntityGraph bugfixes;
  • fixes for load plan bugs that caused problems with CompositeCustomType IDs, embeddable @MapKey, maps containing embeddable keys;
  • fix for a classloading bug that affects Hibernate under GlassFish 4.0 HHH-9446 that was introduced by in 4.3.6 by HHH-8818; by setting an environment variable, Hibernate reverts to pre-HHH-8818 behavior;
  • fix for Envers to work with dynamic (non-POJO) entities.

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.9.Final Downloads: 4.3.9.Final ZIP, 4.3.9.Final TGZ
4.2.18.Final Downloads: 4.2.18.Final ZIP, 4.2.18.Final TGZ
4.2.19.Final Downloads: 4.2.19.Final ZIP, 4.2.19.Final TGZ

While we were in Newcastle for a meetup we sat down with John, Mícheál and John about FeedHenry, what it is and how it is going with the opensourcing of their platform.

Also you will hear how the name is tied to royalty!

Find it all in the Show notes and episode.

Have fun!

31. Mar 2015, 22:36 CET, by Steve Ebersole

We just got done releasing Hibernate O/RM 5.0.0.Beta1. I will follow up later with a more in depth blog post for 5.0.0.Final, but this first Beta implements all new APIs and most new features. Specifically in this Beta include:

  • New bootstrapping API - better determinism, better integration
  • Java 8 Support (though still compatible with Java 6). Just add hibernate-java8 to your classpath.
  • Ability to handle additional Java types for id attributes marked as GenerationType#AUTO. Built-in support for Number and UUID. Expandable via new org.hibernate.boot.model.IdGeneratorStrategyInterpreter extension
  • scanning support for non-JPA usage
  • NamingStrategy has been removed in favor of a better designed API. 2 actually: org.hibernate.boot.model.naming.ImplicitNamingStrategy and org.hibernate.boot.model.naming.PhysicalNamingStrategy

Additionally, support for AttributeConverters has been expanded and more fully realized:

  • fully supported for non-@Enumerated enum values
  • applicable in conjunction with @Nationalized support
  • called to handle null values
  • settable in hbm.xml by using type="converter:fully.qualified.AttributeConverterName"
  • integrated with hibernate-envers
  • collection values, map keys

See http://hibernate.org/orm/downloads/ for information on obtaining Hibernate ORM.

NOTE: 5.0 is expected to be compatible with Java 6 (aside from the hibernate-java8 module naturally). However, Beta1 will not work with Java 6 due to something with JAXB that I have not yet had time to investigate. Beta1 requires Java 7. Again, the expectation is to have it be compatible with Java 6 by the next release if possible.

Célébrons l'open source et le partage (English version below).

Place pour Devoxx France à gagner

Devoxx France vous offre une place: je ne suis que le messager :) Elle sera gagnée par l'un d'entre vous. La règle est simple.

Contribuer à un projet open source (code, doc, etc) entre maintenant et dimanche 29 mars 2015 et tweeter le lien vers la pull request ou le patch à @Hibernate.

  • Quel projet ? N'importe pourvu que la licence soit open source. Donc pas limité à Hibernate.
  • Comment sera choisi le vainqueur ? La contribution que je préfère sera choisie. Super bonus si c'est votre première contribution à ce projet : il faut que ça brasse :)
  • Mais si on contribue à un projet Red Hat, on a plus de chance ? Non, tous les projets open source sont (libres et) égaux.
  • Je suis employé Red Hat, je peux gagner? Non. Contacte-moi directement.
  • Et ? C'est tout.

Devoxx France se déroule du 8 au 10 avril à Paris (Palais des Congrès). J'y parlerai entre autre des sujets Object Mappers dans le NoSQL et une BoF Hibernate.

Aller au boulot !

Free pass for Devoxx France

Devoxx France is giving away a free pass through me. I am just the messenger :) One of you will win it. The rule is simple.

Contribute to an open source project (code, doc, etc) between now and Sunday evening 29th of March 2015 and tweet the link to the pull request or the patch to @Hibernate.

  • Which project? Any project released under an open source license. Not limited to Hibernate.
  • How will you chose the winner? The contribution I prefer will be chosen. Extra bonus if that's your first contribution on that project: let's exchange!
  • But if I contribute to a Red Hat project, I have a better chance? No, all open source projects are equals.
  • I am a Red Hat employee, can I win? No. Contact me directly instead.

Devoxx France happens in Paris from the 8th to the 10th of April. I will be speaking about a few topics including Object Mappers and NoSQL and an Hibernate BoF.

Now go contribute!

PS légal: cette place est offerte par Devoxx France et Emmanuel Bernard à titre personnel, pas par Red Hat. Bref, je fais ce que je veux, avec mes cheveux. Legal PS: this pass if given away by Devoxx France and Emmanuel Bernard as an individual and free human being, not Red Hat.

Showing 1 to 5 of 1249 blog entries