cancel
Showing results for 
Search instead for 
Did you mean: 

Search in shared files instead of sites/repository

alexw
Champ on-the-rise
Champ on-the-rise
Hi everyone,

I've been going through the documentation regarding the search functionality in Share, but I can't seem to find what I'm looking for, so here I am.

When I type something in the search bar, the results displayed by default are the matching entries in the sites. My question is: Is there a way to have the repository results displayed by default instead of the sites results? Moreover, is it possible to limit the search (basic as well as advanced) to the Shared folder for every user other than the admin?

Thanks in advance for any help you are able to provide.
5 REPLIES 5

niketapatel
Star Contributor
Star Contributor
Hi Alex,

share search provides different below options to configure search. You can check - share-config.xml

From below options "context" is set as default option.

   none - disable repository wide search option
   context - search depending on current context, including repository, all sites, current site (default)
        always - always search full repository no matter what the context, disables search context options
       
<javascript>
   <config evaluator="string-compare" condition="Search">
      <search>
         <!– default minimum length for search terms –>
         <min-search-term-length>1</min-search-term-length>
        
         <!– default maximum number of results for a search –>
         <max-search-results>250</max-search-results>
        
         <!– Repository search configuration option –>
         <!–
              The 'repository-search' config element value can be one of:
              none - disable repository wide search option
              context - search depending on current context, including repository, all sites, current site (default)
              always - always search full repository no matter what the context, disables search context options
         –>
         <repository-search>context</repository-search>
      </search>
</javascript>
And I think to limit search specific to any folder, configuration is not available, you need to customize script.

alexw
Champ on-the-rise
Champ on-the-rise
Hi,

Thanks for your input. I already saw this file, and unfortunately it doesn't change the search the way I want.

I guess I'll keep looking.

kcchsd
Champ in-the-making
Champ in-the-making
I would like to default the search to display the Repository hits first, and if a user wants to click on All Sites they can.  This is my first time using Alfresco, and I'm working with version 4.2e.  I'm not a programmer, but would it be possible to change the line to read:
sharedfiles-search>context/shared-search , or something of that nature?

boumbh
Champ in-the-making
Champ in-the-making
I also wish to set the search default to Repository, and even to disable completely the "all sites" search.

There is a bug that was reported: https://issues.alfresco.com/jira/browse/MNT-10369, I don’t know if it was / will be fixed on any Community 4.2…

I’ll try and work this around.

mrogers
Star Contributor
Star Contributor
No. 4.2 is no longer current.   It was fixed in 5.0.a