cancel
Showing results for 
Search instead for 
Did you mean: 

Non-incremental model changes

darionis
Champ on-the-rise
Champ on-the-rise

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!

2 ACCEPTED ANSWERS

abhinavmishra14
World-Class Innovator
World-Class Innovator

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, Azure Admin)

View answer in original post


@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, Azure Admin)

View answer in original post

6 REPLIES 6

sanjaybandhaniya
Elite Collaborator
Elite Collaborator

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.


@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.


@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, Azure Admin)


@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!

EddieMay
World-Class Innovator
World-Class Innovator

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!

abhinavmishra14
World-Class Innovator
World-Class Innovator

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, Azure Admin)