-->
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.  [ 11 posts ] 
Author Message
 Post subject: [Serach] Availablility of 3.2 Release
PostPosted: Thu Mar 04, 2010 9:32 am 
Newbie

Joined: Thu Mar 04, 2010 9:30 am
Posts: 5
Hi, an endless time ago I read that the Index will be configurable by api in 3.2, is there any date when this will become available ? I have to make my release planning and this is a long awaited feature...

Regards Thomas


Top
 Profile  
 
 Post subject: Re: [Serach] Availablility of 3.2 Release
PostPosted: Thu Mar 04, 2010 7:28 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
A beta was released already; you could try the API and see if it's covering your needs?
You better try it now than discover it's missing something you need when it's finalized: even if it's a beta I expect all features to work properly, if not please report.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: [Serach] Availablility of 3.2 Release
PostPosted: Fri Mar 05, 2010 4:18 am 
Newbie

Joined: Thu Mar 04, 2010 9:30 am
Posts: 5
Can you give me a starting point for the new configuration API ? I'll have a look at it then.


Top
 Profile  
 
 Post subject: Re: [Serach] Availablility of 3.2 Release
PostPosted: Fri Mar 05, 2010 4:34 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
sure: http://in.relation.to/Bloggers/HibernateSearch32ProgrammaticMappingAPI

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: [Serach] Availablility of 3.2 Release
PostPosted: Fri Mar 05, 2010 4:51 am 
Newbie

Joined: Thu Mar 04, 2010 9:30 am
Posts: 5
Thanks for the link. Just one freaky question I have ? I Set up my EMF with Spring, and I dont see how the property maps to the searchmapping instance ? I could instantiate the searchmapping with spring but how to link it in ? Is there a way to change the Searchmapping in a running Factory on the fly ? (Otherwise I would need a restart ?)


Top
 Profile  
 
 Post subject: Re: [Serach] Availablility of 3.2 Release
PostPosted: Fri Mar 05, 2010 5:46 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
I guess it's easier then to not pass the mapping instance but the mapping-factory class name;
see this test for a quick example: org.hibernate.search.test.configuration.ProgrammaticMappingTest line 707

Code:
cfg.getProperties().put( Environment.MODEL_MAPPING, ProgrammaticSearchMappingFactory.class.getName() );

or translated into a standard configuration property:
Code:
hibernate.search.model_mapping=org.hibernate.search.test.configuration.ProgrammaticSearchMappingFactory


which has the effect to plugin your custom code to define the mapping:
Code:
public class ProgrammaticSearchMappingFactory {
      
   @Factory
   public SearchMapping build() {
      SearchMapping mapping = new SearchMapping();
      mapping.fullTextFilterDef("security", SecurityFilter ...
                            ...


Note the org.hibernate.search.annotations.Factory annotation to define which method should be used to build the programmatic configuration

I just noticed the property key changed from the blogpost, editing the post and fixing docs: use the org.hibernate.search.Environment.MODEL_MAPPING constant to make sure.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: [Serach] Availablility of 3.2 Release
PostPosted: Fri Mar 05, 2010 5:54 am 
Newbie

Joined: Thu Mar 04, 2010 9:30 am
Posts: 5
Thanks for the useful input ! I guess I can have a lift off with that.


Top
 Profile  
 
 Post subject: Re: [Serach] Availablility of 3.2 Release
PostPosted: Fri Mar 05, 2010 6:02 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
sorry I just realized I was showing you a feature of beta2 which was not released yet.
The programmatic API is available since beta1 but to inject the custom configuration in a simple property file was not available initially.

It should be possible to extend the Spring component starting the EMF, or you can checkout Search's trunk and try that.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: [Serach] Availablility of 3.2 Release
PostPosted: Fri Mar 05, 2010 6:10 am 
Newbie

Joined: Thu Mar 04, 2010 9:30 am
Posts: 5
How is the configuration passed then ? I thought I could only hand over a String ?
Is there a nightly build I can use or do I have to roll my own ?


Top
 Profile  
 
 Post subject: Re: [Serach] Availablility of 3.2 Release
PostPosted: Fri Mar 05, 2010 6:28 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
there's no distribution of nightly builds;
this might be useful: https://www.hibernate.org/462.html
as you might need to setup the maven repos of jboss.

You can hand it over a string containing a fully qualified class name, or a class instance, or a SearchMapping instance.
In string-format configuration files you're of course limited to a FQ classname.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: [Serach] Availablility of 3.2 Release
PostPosted: Sat Aug 07, 2010 5:01 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
Hibernate Search 3.2.0.Final containing the programmatic configuration API was released months ago, and a few weeks ago we released 3.2.1.Final too which is the recommended version to be used.

Please follow the http://in.relation.to/ or http://jboss.org feeds for news.
You can always find the latest information on http://search.hibernate.org

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 11 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.