cancel
Showing results for 
Search instead for 
Did you mean: 

Aspect filter in Advanced Search

ale_carraro
Champ in-the-making
Champ in-the-making
Is it possible to add a drop down list in advanced search page, with a filter on aspects, like the folder type or the content type?

It shuld show nodes having that aspect, but without knowing anything about its metadata…

I really can't find any reason about not implementing such an useful query criteria in the default web client and found nothing neither in forums, nor in the wiki, nor in the source code…
thanks

Alex
3 REPLIES 3

jpotts
World-Class Innovator
World-Class Innovator
Alex,

The Lucene API supports this through the ASPECT field (e.g., ASPECT:"cm:versionable") so this could be added by customizing the advanced search page. If you want it to be a dropdown based on all of the aspects defined, the backing bean would ask the Dictionary Service for that list to populate the entries in the dropdown.

Once you got that working, you'd probably have to tweak the query builder logic that's already in there to add the "+ASPECT…" clause to the query before it gets executed.

My initial thought as to why that's not in there already is that "typical" users don't know what an aspect is but the argument against that is that the "Add Aspect" action is public and seen/used by normal users. Probably the real reason is just no one's asked for it and/or taken the time to do it.

I think it'd be a pretty minor customization.

Jeff

ale_carraro
Champ in-the-making
Champ in-the-making
A reply from the mighty Jeff Pots! Wow, I've read all yours (GREAT) tutorials! (and going to buy your latest book …)

When looking for this feature, I asked myself if the feature is actually useful, too.

If the search could be negated, it could be very powerful.

For example, someone could search for documents NOT translated (yet)
I'd like to know if any of my scripts/web scripts in the "data dictionary" space are NOT versioned.
Looking for common keywords, I may want to restrict results that I know are bound to a specific aspect (Example: Assuming that in the repository I've got all Alfresco resources I found, and I was looking for your "Alfresco Developer Guide" . Searching for Alfresco, Developer, Guide will return almost the entire repository. But not if I search for Alfresco, Developer, Guide, ASPECT:dublinCore

The real reason for my surprise is that indeed this is a minor thing to implement, but I'm a bit worried about overwriting code from Alfresco, because I'm not sure if I'm able to contribute in a so important feature of this beautiful platform at this moment

jpotts
World-Class Innovator
World-Class Innovator
You should be able to extend the advanced search page doing what you've described without touching any of the Alfresco core code. In addition to the NOT logic, it'd also be cool if you could choose whether to AND or OR search terms. We've done some similar customizations for clients but nothing we can make available, unfortunately.

Jeff