05-12-2017 08:44 AM
Hello,
I created a custom advanced seach 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 :
\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\search
\tomcat\webapps\ROOT\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\search
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 !
05-12-2017 10:03 AM
J'ai pas la réponse exacte mais à mon avis c'est par rapport à l'url
si tu checks les arguments changent en fonction de ce que tu sélectionnes
http://localhost:8081/share/page/dp/ws/faceted-search#searchTerm=a&scope=repo&sortField=Relevance
http://localhost:8081/share/page/dp/ws/faceted-search#searchTerm=a&scope=all_sites&sortField=Relevance
à mon avis il va falloir trouvé ou est généré l'url par ta recherche avancé et modifier l'argument avec une extension
05-15-2017 03:00 AM
Merci, je vais chercher de ce coté là et je mettrais à jour le message si je trouve une solution.
Explore our Alfresco products with the links below. Use labels to filter content by product module.