cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Advance Search using Aspect and content type

amarendrakt
Champ on-the-rise
Champ on-the-rise
Hello every body,

My Alfresco customization requires that i need two diffrent kind of advance search.one based on custome Aspect and another one based on custom content type.

When we are searching based on aspect it should search for the spaces and when we are searching based on the custom content type it shuold search for the folders.

in my UI i have two radio buttons to select the search criteria.one for aspect and another one for content type.if we select the radio button for the aspect it should render the custom search component based on the aspect and vice versa.

can anyone suggest me how to proceed for the same.

Thanks in Advance.

Amarendra
4 REPLIES 4

bsawler
Champ in-the-making
Champ in-the-making
Hi, I was also looking to search based on aspects, but not sure how. 

But if you want to search on custom content and properties, you need to edit the web-client-config-custom.xml file to include your specific custom content.

For example I added custom content of: Document Revision and Revision Description.  Now you need to add the following text so that it appears under the Additional Options in the Advanced Search.   You need to change DocumentProperties, DocumentRev, RevDesc for your specific case.


 <config evaluator="string-compare" condition="Advanced Search">
      <advanced-search>
         <custom-properties>
            <meta-data aspect="custom:DocumentProperties" property="custom:DocumentRev" />   
            <meta-data aspect="custom:DocumentProperties" property="custom:RevDesc" />       
         </custom-properties>
      </advanced-search>
   </config>

nyronian
Champ in-the-making
Champ in-the-making
So is there a way to simply search the repository for an aspect only? 

I would like my end users to be able to search (in advanced search) for all content that has a particular aspect applied, not necessarily for a property of the aspect.

Thanks.

kevinr
Star Contributor
Star Contributor
No there is no feature to do this at present. It could be done as all the facilities are in our Lucene integration to search on ASPECT - we do it a lot in the code as you might imagine.

Kevin

nyronian
Champ in-the-making
Champ in-the-making
Thanks for the reply Kevin.

Oh yes, I know you can search in lucene just for an aspect, I just wanted my end users to have the ability.

One simple way around it I suppose would be to put a boolean field(checkbox) that defaults to true when the aspect is applied and allow that to be searched in advanced search.  If I make it non-editable (in the details of the node) then it could never really be turned off by the end user.

I think I will try that.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.