alfrescoalfresco-sharealfresco-enterprise

Where to put the live-search-docs config file in all in one alfresco project?


I have been going through some blog posts that tell how to customize the live search . What is not clear to me is where should I place the live-search-docs.get.config.xml file in my all-in-one-share project so that it is bootstrapped and deployed in the correct location.

Please can some one advise where the file should be placed in my all-in-one alfresco project?

From the link below

https://www.bluefishgroup.com/insights/ecm/adding-metadata-fields-to-simple-search-and-live-search-with-alfresco-5/

they suggest the search query customization file to be placed under

These files can now be modified to add additional metadata fields as needed. Once the files have been updated, they should be deployed to the ‘extensions’ directory so that they will override the out of the box configuration. If you are deploying your code as a custom AMP file, the files should target the following directory:

tomcat/webapps/alfresco/WEB-INF/classes/alfresco/extension/templates/webscripts/org/alfresco/slingshot/search

if my file needs to end up in the above path in my WAR, where exactly should I place the search file in my all-in-one alfresco project so that its deployed to the above folder? I would like this to be bootstrapped with my all in one project. I tried putting the file under src/main/resources/alfresco/site-webscripts with the remaining path for the file but that did not work.

Thanks


Solution

  • The easiest way is to create a copy of that file in:

    my-all-in-one-project-platform-jar/src/main/resources/alfresco/extension/templates/webscripts/org/alfresco/slingshot/search/
    

    where, of course, my-all-in-one-project-platform-jar must be substituted with the name that you have specified when the project was created with the all-in-one archetype.

    The file in the extension subpath will override the corresponding OOTB files.

    See Web scripts