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

Gunnar Morling gunnar at hibernate.org
Mon May 4 03:11:06 EDT 2015

+1 for merging this work and making the changed behaviour very apparent in
the migration notes  / announcement.

Btw. in addition to @Facet, it should be possible to enable specific fields
for faceting via the mapping API (if that's not part of the PR yet). Then a
user could programmatically enable faceting for all fields if that's what
they need.


2015-05-01 17:56 GMT+02:00 Sanne Grinovero <sanne at hibernate.org>:

> 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
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev

More information about the hibernate-dev mailing list