AnsweredAssumed Answered

Seach in the repository by default in advanced search

Question asked by thibault.l on May 12, 2017
Latest reply on May 15, 2017 by thibault.l



I created a custom advanced seach form : 

custom advanced form


It works as intended but the search is in "all sites" by default.



I would like to perfom all the advanced search in repository instead of all site : 


It's possible ? How can I do this?

I'm using Alfresco Community 5.2.

Thanks !



Update :

I found a solution that work for me : there is two files called advsearch.get.js in :





which contain :

 // config override can force repository search on/off
   model.searchScope = siteId || "all_sites";
   model.siteId = siteId;
   model.searchForms = searchForms;
   model.searchPath = "{site}dp/ws/faceted-search#searchTerm={terms}&query={query}&scope={scope}";



So I just replaced

   model.searchPath = "{site}dp/ws/faceted-search#searchTerm={terms}&query={query}&scope={scope}

by :

   model.searchPath = "{site}dp/ws/faceted-search#searchTerm={terms}&query={query}&scope=repo";

And restarted the server.


I don't know if the best solution but it's working !