Search This Blog

About Me

Highly experienced in implementation and customization of Alfresco. More than 11 years of experience working on Alfresco, versions ranging from 2.x to 5.x. Successfully processed innovative and tailored CMS solutions to meet ever-changing business requirements for multiple clients. Role Includes : Experience in Alfresco Upgrades, SOLR migration, Proposals, Team Handling, Delivery, Content Migration, POC's etc.. Extensive experience in client co ordination, working on offshore-onshore model and project take over. Technical Expertise Includes : Java, JSP, Servlet, JSF, JavaScript, AJAX, Spring, SQL, Hibernate, Web Services(REST). Specialities Includes : Content Migration, Product Customization, Business CMS Solutions, Workflow, Project Transition.

Monday, January 14, 2019

Alfresco Live Search Doesn't Return System Folders

Alfresco OOB do not return system created files and folders using share and live search.
This Alfresco could probably be intentionally kept to keep system created folders skipped while searching in repository.

If you have files or folders you have created by System user via webscripts or scheduled jobs.
And want these files and folders to appear in live or share search.
Follow couple of simple overrides mentioned below.

1. Go to https://svn.alfresco.com/repos/alfresco-open-mirror/web-apps/Share/trunk/share-services/src/main/resources/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js

2. Create a folder structure under shared/classes/alfresco/extension/templates/webscripts/org/alfresco/slingshot/search

3. Copy the file search.get.js from above svn link and do below change

3.1 Change import from classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.lib.js to classpath:/alfresco/extension/templates/webscripts/org/alfresco/slingshot/search/search.lib.js

4. Create another file search.lib.js in same shared location and copy contents from svn https://svn.alfresco.com/repos/alfresco-open-mirror/web-apps/Share/trunk/share-services/src/main/resources/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.lib.js

5. Add below changes at line number 1184

5.1

 /*fqs.push('-TYPE:"cm:thumbnail" AND -TYPE:"cm:failedThumbnail" AND -TYPE:"cm:rating" AND -TYPE:"st:site"' +
               ' AND -ASPECT:"st:siteContainer" AND -ASPECT:"sys:hidden" AND -cm:creator:system AND -QNAME:comment\\-*'); */
fqs.push('-TYPE:"cm:thumbnail" AND -TYPE:"cm:failedThumbnail" AND -TYPE:"cm:rating" AND -TYPE:"st:site"' +
               ' AND -ASPECT:"st:siteContainer" AND -ASPECT:"sys:hidden" AND -QNAME:comment\\-*');

6. Restart the server.

You should be getting system created files and folders in search results now.