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 !
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
Merci, je vais chercher de ce coté là et je mettrais à jour le message si je trouve une solution.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.