Hibernate Search 3.1 Supports Dynamic Search Analyzer and Query Time Performance Improvements
The latest version of Hibernate Search, an open source domain model search framework from Hibernate group, supports a declarative and dynamic search analyzer model as well as indexing and query time performance improvements. Hibernate Search development team recently announced the release of Version 3.1 of the search framework. The new version also includes features for indexing and querying including support for term vector, access to scoped analyzer at query time and access to Results Explanation object.
- The new analyzer model can be declaratively configured to use and compose features like phonetic approximation, n-gram approximation, search by synonyms, stop words filtering, elision correction and unaccented search.
- Analyzers can be composed as a tokenizer and a set of filters using the Apache Solr search library.
- Dynamic Analyzers: These allow a given entity to define the analyzer used at runtime which is useful in applications with multi-language support where the language varies from one entity instance to another.
Indexing time performance improvements include:
- Better control over manual indexing and index writing (RAM consumption, non-compound file format flag etc).
- Support for term vector and custom similarity.
- Better support for large index replication.
- Improve contention and lock window during indexing and reduce the number of index opening/closing.
- Indexing is done in parallel per directory.
New features added to query time performance are as follows:
- Expose entity-scoped and named analyzer for easy reuse at query time.
- Filter results (DocIdSet) can be cached declaratively.
- Query results Explanation is exposed for better debugging information.
- Reduce the number of database roundtrips on multi-entity searches.
- Faster Lucene queries on indexes containing a single entity type and reduction of I/O consumption on Lucene by reading only the necessary fields of a document (when possible).
- Better performance on projected properties (no noticeable overhead compared to raw Lucene calls).
- Reduction of document reads (during pagination and on getResultSize() calls).
- Faster index reopening (keeps unchanged segments opened) and better index reader concurrency (use of the read only flag).
Emmanuel Bernard blogged about the new release and its features which include the usage of SLF4J as the logging framework and migration of Lucene to version 2.4, Hibernate Core to version 3.3 and JDK 5.0. Hibernate Search works in non-clustered and clustered mode, provides synchronous index updates and asynchronous index updates, giving the option to choose between response time, throughput and index update. It also works with all traditional Hibernate patterns, especially the long (atomic) conversation pattern used by JBoss Seam.
The latest release can be downloaded on their site and the change logs are available on JIRA. Migrating to this version is recommended for all users (see the Migration guide). The road map document shows the new features the Hibernate Search team is targeting for the upcoming releases of the framework.
Juergen Hoeller Jul 22, 2014