Flexibility to add any attribute to any document

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

Flexibility to add any attribute to any document

Hi, 

In our custom alfresco application, we want to have flexibility to add any attribute to any document. If there are 100 different attributes in the whole application we would like to have a separate aspect for every attribute, meaning 100 aspects. Then be able to add any attribute via REST API. Please provide suggestion based on how this design effects below:

  • Design flexibility
  • Performance issues with REST API, DB and SOLR
  • Querying options with SOLR

I believe this will have a negative impact on CMIS queries, as it requires a join for every aspect to use its attributes in query. 

On the other hand, would it be a better to have all the attributes on a single object type and just use them as needed based on different document requirement by tweaking the UI?

Thank You.

1 Reply
folcina
Active Member II

Re: Flexibility to add any attribute to any document

Speaking about design flexibility, in terms of content modelling, adding a new content model or modify an existing one is a common practise as long as changes are only incremental. Remove elements from content models or an entire content models is a non recommended operation and might require to engage our consulting services.

Alfresco API, DB and Solr are capable of coping with such design and performance depends on different factors: maintenance and optimisation of DB, configuration and “specs” of Solr node(s), amount of content using custom aspects, claimed content on searches… The best way to have a better idea of performance impact is by testing the design in a staging environment and get some statistics. 

When it comes to searches in Solr, wildcards and ‘OR’s are often the slowdown factors as Solr has to go through many results and sort them out.

Regarding the use of a single object type with all the aspects, it won’t make any different in performance if compared to setting the aspects directly on a node. This is due to the way aspects are linked to nodes at the DB level.