-->
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.  [ 5 posts ] 
Author Message
 Post subject: Hibernate Search: dynamic index name based on object content
PostPosted: Thu May 12, 2011 3:29 am 
Newbie

Joined: Tue Feb 08, 2011 10:05 am
Posts: 13
Hello

I've got the following scheme:
1. User has articles
2. User would like to search throw own articles
3. User dont need to search throw other articles

I think the best solution for me to make one index per each user. Each article has property userName. Is it possible to make index title of article dependeble on property userName... Something like
Code:
@Indexed(index="{userName}")
public class Article {...


Top
 Profile  
 
 Post subject: Re: Hibernate Search: dynamic index name based on object content
PostPosted: Thu May 12, 2011 5:09 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
yes, look at sharding on the reference docs.
http://docs.jboss.org/hibernate/stable/search/reference/en-US/html_single/#search-configuration-directory-sharding

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


Top
 Profile  
 
 Post subject: Re: Hibernate Search: dynamic index name based on object content
PostPosted: Thu May 12, 2011 5:27 am 
Newbie

Joined: Tue Feb 08, 2011 10:05 am
Posts: 13
thank you. At search moment can I limit shard that Hibernate Search will look throw?


Top
 Profile  
 
 Post subject: Re: Hibernate Search: dynamic index name based on object content
PostPosted: Thu May 12, 2011 5:30 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
yes, there's a filter which has the power to restrict the shards being taken in consideration from a filter parameter.

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


Top
 Profile  
 
 Post subject: Re: Hibernate Search: dynamic index name based on object content
PostPosted: Thu May 12, 2011 5:31 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
http://docs.jboss.org/hibernate/stable/search/reference/en-US/html_single/#query-filter-shard

_________________
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.  [ 5 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.