Changing Search minimum number of terms

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2015 03:57 PM
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:
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
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
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2015 05:44 PM
Although this customization successfully changes the minimum number of search terms to 0, it actually breaks the Search functionality. Now when I search for anything in the Main Search, I always get "0 results found" (no matter what I search for).
When I revert back to the original configuration, the Search works again.
How can I change the minimum number of search terms to 0 without breaking the Search functionality?
Thanks
When I revert back to the original configuration, the Search works again.
How can I change the minimum number of search terms to 0 without breaking the Search functionality?
Thanks
