-->
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: Search: API Config with Spring
PostPosted: Thu Aug 12, 2010 11:52 am 
Newbie

Joined: Thu Aug 12, 2010 11:49 am
Posts: 1
Hi, I remember some long time ago I read a blog post how to do it, but I cannot remember sadly. I want to use the programmatic index config with a spring setup, and I remember theres a way to use a factory for the SearchMapping Object, But I did not see this in the docs. Or is there any other way to get the Mapping Object into my spring config ?


Top
 Profile  
 
 Post subject: Re: Search: API Config with Spring
PostPosted: Thu Aug 12, 2010 12:10 pm 
Pro
Pro

Joined: Wed Oct 03, 2007 2:31 pm
Posts: 205
Hi

Do the following:

Code:
public class ProgrammaticApiFactory {

  @Factory
  public SearchMapping build() {
   ...define your searchmapping object and return
  }
}


and then in your session factory hibernate properties section add the following:

Code:
hibernate.search.model_mapping=ProgrammaticApiFactory


Give that a try. Let us know if it works (not saying it wouldn't :)).


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.