-->
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.  [ 3 posts ] 
Author Message
 Post subject: cannot share analyzer using annotation in package-info
PostPosted: Wed Nov 10, 2010 3:58 pm 
Beginner
Beginner

Joined: Thu Nov 20, 2003 10:16 pm
Posts: 28
Location: Los Angeles, CA
Hibernate Search does not allow definition of multiple analyzers with the same name, even when in different class files. It treats them as global. Fine. But then why can't I define them in one place in a package-info.java? When I try to do so, I get errors complaining about it not being able to find the analyzer for the named definition. It will only work if I include the definition in some indexed class.

I guess a workaround would be to just define a dummy indexed class and include the definitions there, but it would be nice if the package-level annotations could also be picked up.

Michael


Top
 Profile  
 
 Post subject: Re: cannot share analyzer using annotation in package-info
PostPosted: Thu Nov 11, 2010 6:14 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Right, at the moment you would have to collect all analyzer mappings in an entity. An alternative could be to create a SearchMapping instance just defining the global analyzers programmatically and then adding this mapping to properties of the configuration using the key hibernate.search.model_mapping. I haven't tried this, but it should work.

You can also open a jira issue in HSEARCH regarding considering package level annotations.

--Hardy


Top
 Profile  
 
 Post subject: Re: cannot share analyzer using annotation in package-info
PostPosted: Thu Nov 11, 2010 4:50 pm 
Beginner
Beginner

Joined: Thu Nov 20, 2003 10:16 pm
Posts: 28
Location: Los Angeles, CA
Ok, I'll open a jira. Thanks, Hardy.


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