cancel
Showing results for 
Search instead for 
Did you mean: 

Custom aspects, categories, and performance

hbf
Champ on-the-rise
Champ on-the-rise
Dear all,

I am using aspects to add additional information to instances of my content types. For example, there is an aspect "website" that can be applied to the instances of my content types "Person", "Institution", "Public Database", etc.

Here's my question: I need a way to quickly list all content instances that have, for example, the aspect "website" and the category "Switzerland". Can I do this using for instance the JavaScript API? Does it scale well?

Alternatively, I could add categorization to my content instances: If the instance has an aspect "website" it also has the category "website". In this way, I could use the Category API to do the search (and this will scale well, I guess). Drawback: How can I make sure that aspect "website" and category "website" are always added/removed together?

Or does Alfresco provide a way to "link" aspects and categories together in this sense? (I see a routine with the promising name getAllClassificationAspects() in the API but have no idea what it does.)

Many thanks for any hint!
Kaspar
1 REPLY 1

kevinr
Star Contributor
Star Contributor
Here's my question: I need a way to quickly list all content instances that have, for example, the aspect "website" and the category "Switzerland". Can I do this using for instance the JavaScript API? Does it scale well?

You can use a Lucene query for this via the JavaScript API - we index items by aspect so yes it will scale well.

Thanks,

Kevin