AnsweredAssumed Answered

[Solved] Changing search defaults

Question asked by tamarix on Nov 14, 2011
Latest reply on Nov 14, 2011 by tamarix
Hi,

I wanted to modify the search defaults so that I am not oblige to enter at least 1 character in the search box and can for example simply list all registered users, without knowing them a priori.

I followed Mike H suggestion (https://forums.alfresco.com/en/viewtopic.php?f=20&t=41759) and modifed share-config-custom.xml in my Alfresco 4.0b by adding

    <alfresco-config>

       <!–
          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>
                <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>

    </alfresco-config>

This works just fine and I do not need anymore to enter a character in the search box.

BUT if I now want to create a folder in the documentLibrary, I get the following error

Could not load dialog template from '/share/service/components/form?itemKind=type&itemId=cm:folder&destination=workspace://SpacesStore/018f1e8d-f7e8-489e-ae2c-0a4ecb4bc2ac&mode=create&submitType=json&formId=doclib-common&showCancelButton=true'.

If I remove the code which I added in share-config-custom.xml, I can create the directory bot lose the capacity to search without entering 1 character.


Many thanks for advices here

Franck

Outcomes