-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate Search: configure Facet for custom FieldBridge
PostPosted: Thu Jun 15, 2017 5:16 pm 
Newbie

Joined: Thu Jun 15, 2017 5:00 pm
Posts: 1
I'm using the custom FieldBridge https://github.com/hibernate/hibernate-search/blob/master/orm/src/test/java/org/hibernate/search/test/bridge/DateSplitBridge.java to split a Calendar in the year, month and day fields.

How do I configure Facet for such fields?

But when I try to do a faceted search I get the error:
Quote:
Facet request 'YEAR' tries to facet on field 'date.year' which either does not exist or is not configured for faceting (via @Facet)


I'm using programmatic API for the annotations and have tried several combinations like the one below, without any luck:

Code:
.property("creationDate", ElementType.METHOD)
           .bridge(CalendarSplitBridge.class)
           .field()
              .name("date")
              .analyze(Analyze.NO)
              .store(Store.YES)
              .facet();


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.