cancel
Showing results for 
Search instead for 
Did you mean: 

[Solved] Changing search defaults

tamarix
Champ on-the-rise
Champ on-the-rise
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
2 REPLIES 2

mikeh
Star Contributor
Star Contributor
I've just tested that exact same config and it worked ok. Is there anything else in your share-config-custom.xml file? Do you have a log trace for the complete error (Tomcat console, or alfresco.log)

Thanks,
Mike

tamarix
Champ on-the-rise
Champ on-the-rise
Thanks for reactivity.

I checked again the code … And noticed that I did not remove the <alfresco-config> from the code so it was appearing twice in my file.

I removed this tag so it now appears only once in the file and everything is now OK.

Sorry for this stupid mistake and thanks again
Franck