-->
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: Hibernate Search Multi-tenancy MassIndexer problem
PostPosted: Fri Feb 06, 2015 7:53 pm 
Newbie

Joined: Tue Jul 19, 2005 1:28 pm
Posts: 17
I am using Hibernate Search 4.3 with Multitenant sharding strategy. The indexing work fines and also the indexes are being written one per tenant. However, when I try to re-index by going through a MassIndexer, I see that it deletes all the shards instead of the current shard that is being resolved using Multitenant sharding strategy. After going through the code I find this method in the DynamicShardingStrategy class which get all shards instead of getting the current thread local shard (or one resolved by Sharding Strategy provider)

Code:
@Override
80    public IndexManager[] More ...getIndexManagersForDeletion(Class<?> entity, Serializable id, String idInString) {
81       Set<String> shardIdentifiers = shardIdentifierProvider.getAllShardIdentifiers();
82       return getIndexManagersFromShards( shardIdentifiers );
83    }


Is this by design?

Shouldn't this delete by getting the tenantid instead of all the shards?

How can I overcome this limitation. In my case when I want to recreate an index for a particular shard (which happens to be a tenant) without effecting the other shards.

Thanks


Top
 Profile  
 
 Post subject: Re: Hibernate Search Multi-tenancy MassIndexer problem
PostPosted: Fri Apr 17, 2015 8:33 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
we just published a version which supports proper integration with Hibernate ORM's multi-tenancy features:
http://in.relation.to/Bloggers/MultiTenancyForHibernateSearchUsers520Beta1Released

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