-->
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: Search: Can't Index Collections of Primitive Wrappers
PostPosted: Wed Jun 02, 2010 9:52 pm 
Beginner
Beginner

Joined: Fri Jan 29, 2010 8:17 pm
Posts: 20
Location: Portland OR
I thought this would be straight forward, but either there is a bug or this is not supported for reasons unknown to me. Though from Hibernate Search In Action, the treatment of Collections seems to be that 1. All collections hibernate core supports is supported, and 2. Use IndexEmbedded.

Whenever I have a property that is a collection of Integer, Double, String, you name it. It doesn't get indexed. I have:

@CollectionOfElements
@JoinTable(name="enrollment_groups", joinColumns={@JoinColumn(name="enrollee_id")})
@Column(name="enrollment_group_id")
@IndexedEmbedded
private Set<String> utilityEnrollmentGroups;

If I were to change this to a group of embedded types, everything gets indexed just fine.

Is this a known issue? Bug?

Here are the various core and module versions in use:
Core: 3.5.2
Search: 3.2.0

Any help would be appreciated.


Top
 Profile  
 
 Post subject: Re: Search: Can't Index Collections of Primitive Wrappers
PostPosted: Thu Jun 03, 2010 2:57 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hello,
currently @IndexedEmbedded expect a type having annotated fields, you should add a simple fieldBridge.

I think it would be cool to support this, please open a JIRA request for new feature: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH

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


Top
 Profile  
 
 Post subject: Re: Search: Can't Index Collections of Primitive Wrappers
PostPosted: Thu Jun 03, 2010 12:28 pm 
Beginner
Beginner

Joined: Fri Jan 29, 2010 8:17 pm
Posts: 20
Location: Portland OR
Thanks Sanne. I feel better knowing I didn't miss something obvious.

I've created a new feature request: http://opensource.atlassian.com/project ... SEARCH-539

In the meantime I'll go with the custom bridge work around.


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.