From 1f63c49fb1abb3bc32f31bcc5cc95018f142b5f3 Mon Sep 17 00:00:00 2001 From: David Draper Date: Mon, 19 May 2014 13:04:59 +0000 Subject: [PATCH] Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud) 70754: Modifications to files after merge from WAT1 to HBF so that the two branches are the same except for version.properties and pom.xml versions These changes need to be checked as they may have been incorrectly merged to WAT1 in the first place. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@70982 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../alfresco/slingshot/search/search.lib.js | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/config/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.lib.js b/config/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.lib.js index 5c802eeb47..09c7161579 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.lib.js +++ b/config/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.lib.js @@ -575,6 +575,11 @@ function splitQNamePath(node, rootNodeDisplayPath, rootNodeQNamePath, qnameOnly) } } + if (overriden && parts == null) + { + displayPath.unshift(""); + } + return (parts !== null ? parts : [ null, null, displayPath ]); } @@ -945,7 +950,16 @@ function getSearchResults(params) } else { - formQuery += (first ? '' : ' AND ') + escapeQName(propName) + ':\\"' + propValue + '\\"'; + var index = propValue.lastIndexOf(" "); + formQuery += (first ? '' : ' AND ') + escapeQName(propName) + if (index > 0 && index < propValue.length - 1) + { + formQuery += ':(' + propValue + ')'; + } + else + { + formQuery += ':"' + propValue + '"'; + } } first = false; } @@ -1015,7 +1029,7 @@ function getSearchResults(params) } } - // ensure a TYPE is specified - if not, then add one to remove system objects etc. from result sets + // ensure a TYPE is specified - if no add one to remove system objects from result sets if (ftsQuery.indexOf("TYPE:\"") === -1 && ftsQuery.indexOf("TYPE:'") === -1) { ftsQuery += ' AND (+TYPE:"cm:content" OR +TYPE:"cm:folder")'; @@ -1055,7 +1069,7 @@ function getSearchResults(params) } ftsQuery = '(' + ftsQuery + ') AND -TYPE:"cm:thumbnail" AND -TYPE:"cm:failedThumbnail" AND -TYPE:"cm:rating" AND -TYPE:"st:site"' + ' AND -ASPECT:"st:siteContainer" AND -ASPECT:"sys:hidden" AND -cm:creator:system'; - + // sort field - expecting field to in one of the following formats: // - short QName form such as: cm:name // - pseudo cm:content field starting with "." such as: .size