mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merged BRANCHES/DEV/V4.0-BUG-FIX to HEAD
35833: Fix for ALF-13881 - Unable to search against custom properties or any props requiring other than cm: namespace default in Share Person Search git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@35834 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -533,7 +533,7 @@ public final class People extends BaseScopableProcessorExtension implements Init
|
||||
{
|
||||
String term = filter.replace("\\", "").replace("\"", "");
|
||||
StringTokenizer t = new StringTokenizer(term, " ");
|
||||
int propIndex = term.indexOf(':');
|
||||
int propIndex = term.lastIndexOf(':');
|
||||
int wildPosition = term.indexOf('*');
|
||||
|
||||
if ((t.countTokens() == 1) && (propIndex == -1) && ((wildPosition == -1) || (wildPosition == (term.length() - 1) )))
|
||||
@@ -568,18 +568,18 @@ public final class People extends BaseScopableProcessorExtension implements Init
|
||||
if (t.countTokens() == 1)
|
||||
{
|
||||
// single word with no field will go against _PERSON and expand
|
||||
|
||||
|
||||
// fts-alfresco property search i.e. location:"maidenhead"
|
||||
query.append(term.substring(0, propIndex+1))
|
||||
.append('"')
|
||||
.append(term.substring(propIndex+1));
|
||||
if(propIndex > 0)
|
||||
if (propIndex > 0)
|
||||
{
|
||||
query.append('"');
|
||||
}
|
||||
else
|
||||
{
|
||||
query.append("*\"");
|
||||
query.append("*\"");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -638,7 +638,7 @@ public final class People extends BaseScopableProcessorExtension implements Init
|
||||
else
|
||||
{
|
||||
// fts-alfresco property search i.e. "location:maidenhead"
|
||||
propIndex = term.indexOf(':');
|
||||
propIndex = term.lastIndexOf(':');
|
||||
query.append(term.substring(0, propIndex+1))
|
||||
.append('"')
|
||||
.append(term.substring(propIndex+1))
|
||||
|
Reference in New Issue
Block a user