-->
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.  [ 2 posts ] 
Author Message
 Post subject: Configure Facet for custom FieldBridge
PostPosted: Mon Sep 19, 2016 10:00 am 
Newbie

Joined: Mon Sep 19, 2016 9:55 am
Posts: 1
In this example https://github.com/hibernate/hibernate- ... ridge.java
dynamic fields are added to indexed document:

public class DateSplitBridge implements FieldBridge {
...
public void set(String name, Object value, Document document, LuceneOptions luceneOptions) {
...
luceneOptions.addFieldToDocument( name + ".year", String.valueOf( year ), document);
...

How do I configure Facet for such ad hoc fields?
Can it be done in FieldBridge itself?


Top
 Profile  
 
 Post subject: Re: Configure Facet for custom FieldBridge
PostPosted: Fri Oct 07, 2016 2:36 am 
Hibernate Team
Hibernate Team

Joined: Sat Jan 24, 2009 12:46 pm
Posts: 388
You can add whatever kind of field you like to the passed Document instance directly, i.e. not using the LuceneOptions helper.

Hth,

--Gunnar

_________________
Visit my blog at http://musingsofaprogrammingaddict.blogspot.com/


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

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.