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!
Solved! Go 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.
@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.
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.
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.
@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.
@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!
Hi @darionis
Thanks for accepting the solution - really helpful for others to know what worked.
Cheers,
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.