-->
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 mapping ideas
PostPosted: Mon Nov 14, 2011 10:49 am 
Pro
Pro

Joined: Wed Nov 05, 2003 7:22 pm
Posts: 211
Hi,

In a project I'm running into some requirements that are solveable with classbridges but would be nice for an annotation. I'm posting them here for consideration:

* Specify the fields to embed in IndexedEmbedded in a bean style manner,
@IndexedEmbedded
@IndexFields(fields="user.id,user.address.street")

* Maximize the number of records to index in a OneToMany relation (e.g. Facebook style comments to wall post, always display max 2)
@OneToMany([...])
@IndexedEmbedded
@IndexMaxRecords(value=1)


Top
 Profile  
 
 Post subject: Re: Search mapping ideas
PostPosted: Tue Nov 15, 2011 6:12 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Quote:
In a project I'm running into some requirements that are solveable with classbridges but would be nice for an annotation. I'm posting them here for consideration:

* Specify the fields to embed in IndexedEmbedded in a bean style manner,
@IndexedEmbedded
@IndexFields(fields="user.id,user.address.street")

That sounds very much like https://hibernate.onjira.com/browse/HSEARCH-886. Work is already in progress on this issue.

Quote:
* Maximize the number of records to index in a OneToMany relation (e.g. Facebook style comments to wall post, always display max 2)
@OneToMany([...])
@IndexedEmbedded
@IndexMaxRecords(value=1)

This this a very specific use case. I am not sure whether it calls for a new annotation. Instead of a custom class bridge you can also use a custom field bridge. You can of course just create a Jira issue and see what happens. If you even provide a patch it might get includes after all ;-)

--Hardy


Top
 Profile  
 
 Post subject: Re: Search mapping ideas
PostPosted: Tue Dec 06, 2011 9:35 am 
Pro
Pro

Joined: Wed Nov 05, 2003 7:22 pm
Posts: 211
You are right. With HSearch 4.0 any issues arising from projection limitations in classbridges are gone anyway


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.