mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
107010: Merged 5.0.N (5.0.3) to HEAD-BUG-FIX (5.1/Cloud) 106860: MNT-14113: User admin console: sorting users causes some to disappear The behavior of indexed people search has been modified to return the same results as a CQ search. The test for this behavior has been added to 'PeolpleTest'. This test is valid for SOLR1/SOLR4 and "buildonly" (Lucene) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@107049 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2013 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2015 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -27,7 +27,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationException;
|
||||
@@ -718,8 +717,12 @@ public class People extends BaseScopableProcessorExtension implements Initializi
|
||||
// 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));
|
||||
query.append(term.substring(0, propIndex + 1)).append('"');
|
||||
if (propIndex < 0)
|
||||
{
|
||||
query.append('*');
|
||||
}
|
||||
query.append(term.substring(propIndex + 1));
|
||||
if (propIndex > 0)
|
||||
{
|
||||
query.append('"');
|
||||
@@ -753,7 +756,7 @@ public class People extends BaseScopableProcessorExtension implements Initializi
|
||||
{
|
||||
// simple search: first name, last name and username
|
||||
// starting with term
|
||||
query.append("_PERSON:\"");
|
||||
query.append("_PERSON:\"*");
|
||||
query.append(token);
|
||||
query.append("*\" ");
|
||||
}
|
||||
@@ -766,7 +769,7 @@ public class People extends BaseScopableProcessorExtension implements Initializi
|
||||
{
|
||||
token = token.substring(0, token.lastIndexOf("*"));
|
||||
}
|
||||
multiPartNames.append("\"");
|
||||
multiPartNames.append("\"*");
|
||||
multiPartNames.append(token);
|
||||
multiPartNames.append("*\"");
|
||||
if (firstToken)
|
||||
|
Reference in New Issue
Block a user