Non-incremental model changes

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member

Non-incremental model changes

Jump to solution

Hi all,

I understand that custom model changes can be only incremental, like new property definition, but what to do when some major changes are required. I have no problem deleteing everything, but what exactly and how?

So I guess I need to delete DB, content store and index. Is that right? Is there any other (easier) recomendation?

Thnak you!

1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator

Re: Non-incremental model changes

Jump to solution

@darionis wrote:

@sanjaybandhniya wrote:

You can delete all the document which have your model type,property or aspect from document library as well as trashcan.

After that you can delete your model property.


I am affraid it is not so simple. I did what you suggest but I get

WARN (searcherExecutor-21-thread-1-processing-x:alfresco) [ x:alfresco] o.a.s.AlfrescoSolrDataModel Model not updated:
bnk:contentModel Failed to validate model update - found non-incrementally updated PROPERTY
'{http://company.eu/model/name/1.0}userNumber'

It looks like solr synchronization is still complaining about the model change.

 


You need to delete indexes and models too from solr server in case you want to re-create everything.

~Abhinav
(ACSCE, AWS SAA-C02, GAIQ)

View solution in original post

6 Replies
Highlighted
Senior Member II

Re: Non-incremental model changes

Jump to solution

You can delete all the document which have your model type,property or aspect from document library as well as trashcan.

After that you can delete your model property.

Thanks & Regards,
Sanjay
Highlighted
Active Member

Re: Non-incremental model changes

Jump to solution

@sanjaybandhniya wrote:

You can delete all the document which have your model type,property or aspect from document library as well as trashcan.

After that you can delete your model property.


I am affraid it is not so simple. I did what you suggest but I get

WARN (searcherExecutor-21-thread-1-processing-x:alfresco) [ x:alfresco] o.a.s.AlfrescoSolrDataModel Model not updated:
bnk:contentModel Failed to validate model update - found non-incrementally updated PROPERTY
'{http://company.eu/model/name/1.0}userNumber'

It looks like solr synchronization is still complaining about the model change.

 

Highlighted
Moderator
Moderator

Re: Non-incremental model changes

Jump to solution

Another alternative option, if you have content in the repository and you dont want to delete them and re-upload. You can do the following:

1- Create a webscript (java/js) or use JSConsole to find all the content and remove all the aspects you have applied from your custom model. If you have custom folder types, remove the custom aspects from custom folder in same way.

2- Change the type of content from custom type you have defined in your content model to cm:content. If you have custom folder types, change the type for custom folder types to cm:folder similarly.

3- By now, all your content/folders (which had any custom property/aspect/type etc.) would have been removed.

4- Stop alfresco and solr

5- Delete indexes and models from solr server

6- Remove the custom model

7- Restart the alfresco and solr servers. It will re-create the indexes 

8- Now, deploy updated content model when ready and use the webscript (similiar to step1) and set custom types to content/folder and apply any required aspects. 

~Abhinav
(ACSCE, AWS SAA-C02, GAIQ)
Highlighted
Moderator
Moderator

Re: Non-incremental model changes

Jump to solution

@darionis wrote:

@sanjaybandhniya wrote:

You can delete all the document which have your model type,property or aspect from document library as well as trashcan.

After that you can delete your model property.


I am affraid it is not so simple. I did what you suggest but I get

WARN (searcherExecutor-21-thread-1-processing-x:alfresco) [ x:alfresco] o.a.s.AlfrescoSolrDataModel Model not updated:
bnk:contentModel Failed to validate model update - found non-incrementally updated PROPERTY
'{http://company.eu/model/name/1.0}userNumber'

It looks like solr synchronization is still complaining about the model change.

 


You need to delete indexes and models too from solr server in case you want to re-create everything.

~Abhinav
(ACSCE, AWS SAA-C02, GAIQ)

View solution in original post

Highlighted
Active Member

Re: Non-incremental model changes

Jump to solution

@abhinavmishra14 wrote:

I am affraid it is not so simple. I did what you suggest but I get

WARN (searcherExecutor-21-thread-1-processing-x:alfresco) [ x:alfresco] o.a.s.AlfrescoSolrDataModel Model not updated:
bnk:contentModel Failed to validate model update - found non-incrementally updated PROPERTY
'{http://company.eu/model/name/1.0}userNumber'

It looks like solr synchronization is still complaining about the model change.

 


You need to delete indexes and models too from solr server in case you want to re-create everything.


 

Yes, deleting SOLR alfresco and archive indexes as well as SOLR models seem to be enough. No need to purge the DB.

Thanks!

Highlighted
Community Manager
Community Manager

Re: Non-incremental model changes

Jump to solution

Hi @darionis 

Thanks for accepting the solution - really helpful for others to know what worked.

Cheers,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!