-->
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: How to rename an entity class without reindexing?
PostPosted: Mon Jul 02, 2012 5:54 am 
Newbie

Joined: Sat Dec 10, 2011 5:57 pm
Posts: 11
Hello.
I have indexed many entities. Now I want to rename the entity class or move it to a different java package and I don't want to reindex whole data. I can ensure that the index files location will stay where they are with @Indexed(index="...") But what can I do with the _hibernate_class field?
Is it possible to do such entity refactoring without reindexing whole index? Will it work?

Thank you


Top
 Profile  
 
 Post subject: Re: How to rename an entity class without reindexing?
PostPosted: Wed Jul 04, 2012 5:14 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

the best thing to do is really to re-index. Is there are particular reason why you cannot do it? It is for sure the easiest solution.

--Hardy


Top
 Profile  
 
 Post subject: Re: How to rename an entity class without reindexing?
PostPosted: Wed Jul 04, 2012 5:18 am 
Newbie

Joined: Sat Dec 10, 2011 5:57 pm
Posts: 11
hardy.ferentschik wrote:

Is there are particular reason why you cannot do it?



It would take several hours to reindex all of the documents we have. So I'm trying to figure out another way...


Top
 Profile  
 
 Post subject: Re: How to rename an entity class without reindexing?
PostPosted: Wed Jul 04, 2012 5:41 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
You could try to edit the index with a custom program. After all it is a plain Lucene index. However, to be safe you would have to do this offline as well. Personally I don't think it is worth the effort. Instead I would use the mass indexer to rebuild the index.


Top
 Profile  
 
 Post subject: Re: How to rename an entity class without reindexing?
PostPosted: Wed Jul 04, 2012 5:50 am 
Newbie

Joined: Sat Dec 10, 2011 5:57 pm
Posts: 11
Thanks for reply


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.