[hibernate-dev] [!] Changing the Faceting API in Hibernate Search

Sanne Grinovero sanne at hibernate.org
Fri May 1 11:56:18 EDT 2015


Hi all,

Hardy completed the Faceting re-work in Hibernate Search to use the
much improved implementation from recent versions of Lucene, and we'd
like to merge his work now making these improvements available to
users of Hibernate Search 5.2.0+

There is a catch: while the API to create a Faceting Query is
unchanged and nicely backwards compatible, you'll now be required to
explicitly sign up the fields which you want to be "facetable" using a
new annotation: @Facet

The default for an indexed property is that faceting is disabled, so
people already using faceting will have to adjust their mapping, and
rebuild the indexes accordingly.
Unfortunately you won't notice the problem at compile time - and we
can't validate for it at boot time - but you'll get a reasonable
explanation in the exception when attempting to create a faceting
query.

There are many benefits to the new approach, so please bear with me
for applying such a non-backwards compatible patch in a minor release:
we won't break this rule often, nor are we lacking great reasons to
proceed.

For details see:
 - https://github.com/hibernate/hibernate-search/pull/821

Thanks,
Sanne


More information about the hibernate-dev mailing list