AnsweredAssumed Answered

Changing Search minimum number of terms

Question asked by voula_11 on Jun 5, 2015
Latest reply on Jun 5, 2015 by voula_11
I am customizing Alfresco Share 5.0.d and I would like to make the minimum number of search terms 0 in all places where there is a search.

I found the solution in an old forum topic, which is to add the following code to share-config-custom.xml:


<!–
       Overridden Search config entries to:
          - remove minimum search term length for all searches.
    –>
   <config evaluator="string-compare" condition="Search" replace="true">
      <search>
         <!– default minimum length for search terms –>
         <min-search-term-length>0</min-search-term-length>
         <!– default maximum number of results for a search –>
         <max-search-results>250</max-search-results>
      </search>
   </config>

   <!–
       Overridden form-config.xml entries to:
          - remove minimum search term length for people searches.
    –>
   <config>
      <forms>
         <default-controls>
            <!– WEB-INF/classes/alfresco/site-webscripts/org/… –>
            <type name="association:cm:person" template="/org/alfresco/components/form/controls/authority.ftl">
               <control-param name="minSearchTermLength">0</control-param>
            </type>
            <type name="association:cm:authority" template="/org/alfresco/components/form/controls/authority.ftl">
               <control-param name="minSearchTermLength">0</control-param>
            </type>
            <type name="association:cm:authorityContainer" template="/org/alfresco/components/form/controls/authority.ftl">
               <control-param name="minSearchTermLength">0</control-param>
            </type>
         </default-controls>
      </forms>
   </config>


This works perfectly.

However, there is one more place where there is a minimum number of search terms: Manage Permissions (of a document or folder) -> Add User/Group -> Search. The minimum number of search terms here is 3.

How can I configure this to be 0? My last resort will be to change the file authority-finder.get.js, but I know it is not recommended to edit JavaScript files.

Any help would be appreciated.

Thanks,

Voula

Outcomes