mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.1 to HEAD
8059: Fix for AWC-1743 - generated phrase searches no longer escape values between the quotes git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8478 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -200,7 +200,7 @@ public class SearchContext implements Serializable
|
||||
if (text.charAt(0) == '"' && text.charAt(text.length() - 1) == '"')
|
||||
{
|
||||
// as a single quoted phrase
|
||||
String quotedSafeText = '"' + QueryParser.escape(text.substring(1, text.length() - 1)) + '"';
|
||||
String quotedSafeText = '"' + text.substring(1, text.length() - 1) + '"';
|
||||
fullTextBuf.append("TEXT:").append(quotedSafeText);
|
||||
nameAttrBuf.append("@").append(nameAttr).append(":").append(quotedSafeText);
|
||||
for (QName qname : this.simpleSearchAdditionalAttrs)
|
||||
@@ -512,11 +512,10 @@ public class SearchContext implements Serializable
|
||||
else
|
||||
{
|
||||
// phrase multi-word search
|
||||
String safeValue = QueryParser.escape(value);
|
||||
if (andOp) buf.append('+');
|
||||
else if (notOp) buf.append('-');
|
||||
buf.append('@').append(Repository.escapeQName(qname)).append(":\"")
|
||||
.append(safeValue).append('"').append(' ');
|
||||
.append(value).append('"').append(' ');
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user