From bda2c56436bbd4ffaffd4ed53672c6dc29c431f0 Mon Sep 17 00:00:00 2001 From: Jamal Kaabi-Mofrad Date: Tue, 10 May 2016 11:45:11 +0000 Subject: [PATCH] Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2) 124919 jvonka: RA-767: Queries API - termMinLength can be optionally overridden - via spring bean override (ie. system-wide / static) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126601 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- config/alfresco/public-rest-context.xml | 1 + source/java/org/alfresco/rest/api/impl/QueriesImpl.java | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config/alfresco/public-rest-context.xml b/config/alfresco/public-rest-context.xml index c474679475..8265ddda86 100644 --- a/config/alfresco/public-rest-context.xml +++ b/config/alfresco/public-rest-context.xml @@ -535,6 +535,7 @@ + diff --git a/source/java/org/alfresco/rest/api/impl/QueriesImpl.java b/source/java/org/alfresco/rest/api/impl/QueriesImpl.java index 6d0572b25b..5dd3349706 100644 --- a/source/java/org/alfresco/rest/api/impl/QueriesImpl.java +++ b/source/java/org/alfresco/rest/api/impl/QueriesImpl.java @@ -72,7 +72,7 @@ public class QueriesImpl implements Queries, InitializingBean private final static String QUERY_LIVE_SEARCH_NODES = "live-search-nodes"; - private final static int TERM_MIN_LEN = 3; // review: should this be configurable system-wide (&/or per-tenant in the cloud) ? + private static int TERM_MIN_LEN = 3; private final static Map MAP_PARAM_SORT_QNAME; @@ -95,6 +95,11 @@ public class QueriesImpl implements Queries, InitializingBean this.sr = sr; } + public void setTermMinLength(int termMinLength) + { + TERM_MIN_LEN = termMinLength; + } + public void setNodes(Nodes nodes) { this.nodes = nodes;