Merged V2.2 to HEAD

8206: Merged V2.1 to V2.2
      8136: Fixed AR-2043: XPathMetadataExtractor extracts empty strings
      8169: Fixes to Office add-in for ACT-267 - saving over an existing non-versionable file.
      8172: Fix for AWC-1838
   8221: Merged V2.1 to V2.2
      8210: Fix for AR-1830 - Search not returning expected results for umulat characters
      8211: Fix for AWC-1463 - MyWebForms and MyWebFiles templates now check for existance of stores before displaying them
   8222: Merged V2.1 to V2.2
      8216: Fix for AWC-1357
   8223: Missing Serializable interface (for web UI clustering)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8485 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2008-03-10 16:37:24 +00:00
parent c473277dbc
commit 163bb15d5e
8 changed files with 66 additions and 30 deletions

View File

@@ -502,21 +502,10 @@ public class SearchContext implements Serializable
*/
private static void processSearchAttribute(QName qname, String value, StringBuilder buf, boolean andOp, boolean notOp)
{
if (value.indexOf(' ') == -1)
{
if (andOp) buf.append('+');
else if (notOp) buf.append('-');
buf.append('@').append(Repository.escapeQName(qname)).append(":")
.append(SearchContext.escape(value)).append(' ');
}
else
{
// phrase multi-word search
if (andOp) buf.append('+');
else if (notOp) buf.append('-');
buf.append('@').append(Repository.escapeQName(qname)).append(":\"")
.append(value).append('"').append(' ');
}
if (andOp) buf.append('+');
else if (notOp) buf.append('-');
buf.append('@').append(Repository.escapeQName(qname)).append(":\"")
.append(value).append("\" ");
}
/**
@@ -530,9 +519,9 @@ public class SearchContext implements Serializable
*/
private static void processSearchTextAttribute(String qname, String value, StringBuilder attrBuf, StringBuilder textBuf)
{
textBuf.append("TEXT:").append(SearchContext.escape(value));
attrBuf.append("@").append(qname).append(":")
.append(SearchContext.escape(value));
textBuf.append("TEXT:\"").append(value).append('"');
attrBuf.append('@').append(qname).append(":\"")
.append(value).append('"');
}
/**