Help

I'm the person behind annotations in Hibernate: Hibernate Annotations, Hibernate EntityManager, Hibernate Validator and Hibernate Search. I am a member of the JPA 2.0 expert group as well as the JSR-303 Bean validation spec lead. You can check out my book Hibernate Search in Action by Manning.

Location: CET
Occupation: Core developer at JBoss, by Red Hat
Archive
My Links

The Hibernate Search team is pleased to announce version 3.0 final. Hibernate Search provides full text search (google-like) capabilities to Hibernate domain model objects. Based on Apache Lucene, Hibernate Search focuses on ease of use and ease of configuration, lowering the barrier to entry of Lucene and its integration with a domain model.

Key features include:

  • Transparent index synchronization: This feature eliminates the need to manually update the index on data change. Events generated by Hibernate Core will trigger the update transparently for the application. Index updates are scoped per transaction to match the application transactional behavior.
  • Seamless integration with the Hibernate and Java Persistence query model: Hibernate Search embraces both the Hibernate and Java Persistence semantic and APIs. As a result, switching from a Hibernate Query Language (HQL) query to a full text query requires only minimal changes to the application.
  • Out-of-the-box asynchronous clustering mode: Handles clustered applications, this out of the box mode also handles gracefully indexing load peaks, avoiding potential contentions on online systems.
  • Product extensibility: Developers can extend Hibernate Search with a series of extension points for deep index interaction customization that helps edge case applications meet their performance and architectural requirements and constraints.

Some additional noticeable features:

  • query filter (similar to the Hibernate Filter feature): useful for security, temporal data, category filtering etc transparently cached for the user
  • join-style query: ability to query based on associated entities
  • query projection: avoid database roundtrips if the relevant data is also stored in the index
  • access to the result score, boost, total number of results and other Lucene metadata
  • ability to manually (re)index and purge data form the index
  • index sharding: sharing the same index for several classes or splitting (sharding) a given class into several indexes. It is useful for performance when the index becomes /very/ big.
  • transparently optimized access to Lucene both for index update and queries
  • native access to the Lucene resources

Many thanks to the community for having over the past year shown support, enthusiasm and helped the product maturation both from a feature set and stability point of view. You can download Hibernate Search or walk through the documentation and the getting started section. Happy searching :)

I will be giving a talk at the Atlanta JUG next Tuesday (18th).

The talk will go through Hibernate Search: why using it, where to use it, it's internal architecture and how to use it best.

I will also introduce Hibernate Shards, what it is and what it is not :)

Hopefully Q&A will have a decent slice of the time cake.

See you in the Perimeter area :)

Hibernate Search 3.0.0.CR1 is now out. This release is mainly the last bits of new features and polishing before the final version. The next cycle will be dedicated to bug fixes (of any bug that pops up), as well as test suite and documentation improvements.

Thanks to Hardy for the new getting started guide (this should ease the path for newcomers), and to John for hammering the last features we wanted in the GA version:

  • /manual indexing/ you can disable event based indexing: useful when the
  • /purge/ you can remove an entity from the index without affecting the database. This is especially useful if you take care of the indexing manually (using a timestamp method for example)

The next version should be the GA release unless some complex bugs are discovered.

Check the changelogs for a detailed change list.

Hibernate Search has a new beta out and comes with a bunch of interesting new features:

  • Named filters: custom filters on query results (transparently cacheable)
  • Automatic index optimization
  • Access to query metadata (Score, ...)
  • Support for the Java Persistence API
  • Index Sharding (indexing an entity into several underlying Lucene indexes)

Named filters

Based on Lucene filters, named filters provide the ability to apply custom filter restrictions to the query results. Enabled by name and parameters (very much like Hibernate Core filters), filters are cacheable to improve performance. Some noticeable use cases are security, temporal data, restriction by population, query within query results.

Automatic index optimization

Hibernate Search can transparently optimize your index after a certain amount of operations (add, delete) or transactions.

Query result metadata

The projection API has been enhanced to return query specific data like the document score (relevance) and a few other metadata.

Support for the Java Persistence API

There is now a FullTextEntityManager and FullTextQuery (extending javax.persistence.Query). No need to access entityManager.getDelegate() anymore.

Index sharding

In extreme cases, Lucene indexes need to be split into several physical indexes. Hibernate Search can now index a given entity to several underlying Lucene indexes.

And a few more

There are a few more additional features:

  • Ability to index a given property in multiple different fields with different settings (without the need for a custom FieldBridge)
  • Fine grained analyzers (global, per entity, per property or per field)
  • Expose Lucene merge factor, max merge doc and max buffered docs
  • Ships with Lucene 2.2

Thanks to John Griffin and Hardy Ferentschik for stepping up on this release. The feature set is up to what was envisioned for the final release (much more actually) and has proven very stable. We expect a short CR cycle and the GA soon after.

Check out here for more info. The download page is here .

Hibernate Search 3.0.0.Beta2 is out with a bunch of new interesting features:

  • shared Lucene IndexReader, significantly increasing the performances especially in read mostly applications
  • ability to customize the object graph fetching strategy
  • properties projection from the Lucene index
  • ability to sort queries (thanks to Hardy Ferentschik)
  • expose the total number of matching results regardless of pagination

Performance

Hibernate Search can now share IndexReaders across queries and threads, making them much more efficient especially on applications where the number of reads is much higher than the number of updates. Opening and warming a Lucene IndexReader can be a relatively costly operation compared to a single query. To enable sharing, just add the following property

hibernate.search.reader.strategy shared

Object loading has been enhanced as well. You can for example define the exact fetching strategy used to load the expected object graph, pretty much like you would do it in a Criteria or HQL query, allowing per use case optimization.

Some use cases do not mandate a fully loaded object. Hibernate Search now allow properties projection from the Lucene index. At the cost of storing the value in the index, you can now retrieve a specific subset of properties. The behavior is similar to HQL or Criteria query projections.

fullTextQuery.setIndexProjection( "id", "summary", "body", "mainAuthor.name" ).list();

Query flexibility

I already talked about the customizable fetching strategy and projection.

The default sorting on Hibernate Search queries is per relevance, but you can now customize this strategy and sort per field(s).

Regardless of the pagination process, it is interesting to know the total number of matching elements. While costly in plain SQL, this information is provided out-of-the-box by Apache Lucene. getResultSize() is now exposed by the FullTextQuery. From this information, you can for example:

  • implement the search engine feature '1-10 of about 888,000,000'
  • implement a fast pagination navigation
  • implement a multi step search engine (gradually enabling approximations if the restricted query(ies) return no or not enough results)

For more information, check the the release notes and download the bundle . Hibernate Search 3.0.0.Beta2 is compatible with Hibernate Core 3.2.x (from 3.2.2), Hibernate Annotations 3.3.x and Hibernate EntityManaher 3.3.x.

Showing 81 to 85 of 99 blog entries