Hibernate Search is a library that integrates Hibernate ORM with Apache Lucene or Elasticsearch by automatically indexing entities, enabling advanced search functionality: full-text, geospatial, aggregations and more. For more information, see Hibernate Search on hibernate.org.

Moving from Alpha2 to Beta1, I am happy to announce the release of Hibernate Search 4.0.0.Beta1. For a full list of changes refer to the Jira release notes. Let's look at some of the changes in detail though.

The parameter list of the annotation org.hibernate.search.annotation.Field has changed (HSEARCH-710, HSEARCH-711). The annotation mixed the concepts of analyzing and storing of norms into a single index parameter (NO, TOKENIZED, UN_TOKENIZED and NO_NORMS). There was no option for analyzed indexing while storing no norms and the terminology was using the term tokenizing instead of analyzing. For this reason we changed the API and made the different choices more explicit:

 @Field(index=Index.YES|NO, analyze=Analyze.YES|NO, norms=Norms.YES|NO, ...) 

Another important API change is the ability to access an IndexReader by name (HSEARCH-903). For this purpose an new interface IndexReaderAccessor got introduced. It can be accessed via SearchFactory#getIndexReaderAccessor. The interface offers the following methods:

public interface IndexReaderAccessor {
	IndexReader open(Class<?>... entities);

	IndexReader open(String... indexNames);

	void close(IndexReader indexReader);
}

Last but not least, you can now project on fields added by custom bridges (HSEARCH-890).

Make sure to read the Hibernate Search Migration Guide when trying to upgrade to Hibernate Search 4.

The release is available via the JBoss Maven Repository under the GAV org.hibernate:hibernate-search:4.0.0.Beta1 or via SourceForge. The latest documentation is on the JBoss Docs Server.

--Hardy


Back to top