mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
57092: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3) 56577: Merged V4.1-BUG-FIX (4.1.7) to V4.2-BUG-FIX (4.2.1) 56483: MNT-9629: Merged V4.1.5 (4.1.5.9) to V4.1-BUG-FIX (4.1.7) 56479: MNT-9719 CLONE - User search does not return results with "<firstname> <lastname>" search in admin console users page. - Addition of an Alfresco global property people.search.honor.hint.useCQ, which may be set to false to switch back to just using Solr or Lucene as it was in 4.1.1 rather than the canned query used by the Share User Console git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@61721 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1078,3 +1078,7 @@ system.patch.sharedFolder.deferred=false
|
|||||||
# Default value is run new years day 2030 i.e. not run.
|
# Default value is run new years day 2030 i.e. not run.
|
||||||
system.patch.sharedFolder.cronExpression=0 0 0 ? 1 1 2030
|
system.patch.sharedFolder.cronExpression=0 0 0 ? 1 1 2030
|
||||||
|
|
||||||
|
#
|
||||||
|
# Use a canned query when requested to search for people if " [hint:useCQ]" is provided in search term
|
||||||
|
#
|
||||||
|
people.search.honor.hint.useCQ=true
|
@@ -162,6 +162,9 @@
|
|||||||
<ref bean="userNameGenerator"/>
|
<ref bean="userNameGenerator"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="userRegistrySynchronizer" ref="userRegistrySynchronizer" />
|
<property name="userRegistrySynchronizer" ref="userRegistrySynchronizer" />
|
||||||
|
<property name="honorHintUseCQ">
|
||||||
|
<value>${people.search.honor.hint.useCQ}</value>
|
||||||
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="sessionScript" parent="baseJavaScriptExtension" class="org.alfresco.repo.jscript.Session">
|
<bean id="sessionScript" parent="baseJavaScriptExtension" class="org.alfresco.repo.jscript.Session">
|
||||||
|
@@ -94,6 +94,7 @@ public class People extends BaseScopableProcessorExtension implements Initializi
|
|||||||
private int numRetries = 10;
|
private int numRetries = 10;
|
||||||
|
|
||||||
private int defaultListMaxResults = 5000;
|
private int defaultListMaxResults = 5000;
|
||||||
|
private boolean honorHintUseCQ = true;
|
||||||
|
|
||||||
private static final String HINT_CQ_SUFFIX = " [hint:useCQ]";
|
private static final String HINT_CQ_SUFFIX = " [hint:useCQ]";
|
||||||
|
|
||||||
@@ -243,6 +244,23 @@ public class People extends BaseScopableProcessorExtension implements Initializi
|
|||||||
this.defaultListMaxResults = defaultListMaxResults;
|
this.defaultListMaxResults = defaultListMaxResults;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allows customers to choose to use Solr or Lucene rather than a canned query in
|
||||||
|
* {@link #getPeople(String, int, String, boolean)} when
|
||||||
|
* {@code " [hint:useCQ]"} is appended to the search term (currently Share's
|
||||||
|
* User Console does this). The down side is that new users may not appear as they
|
||||||
|
* will not have been indexed. This is similar to what happened in 4.1.1 prior to
|
||||||
|
* MNT-7548 (4.1.2 and 4.1.1.1). The down side of using a canned query at the moment
|
||||||
|
* is that there is a bug, so that it is impossible to search for names such as
|
||||||
|
* {@code "Carlos Allende García"} where the first or last names may contain spaces.
|
||||||
|
* See MNT-9719 for more details. The alfresco global property
|
||||||
|
* {@code people.search.honor.hint.useCQ} is used to set this value (default is true).
|
||||||
|
*/
|
||||||
|
public void setHonorHintUseCQ(boolean honorHintUseCQ)
|
||||||
|
{
|
||||||
|
this.honorHintUseCQ = honorHintUseCQ;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete a Person with the given username
|
* Delete a Person with the given username
|
||||||
*
|
*
|
||||||
@@ -563,7 +581,7 @@ public class People extends BaseScopableProcessorExtension implements Initializi
|
|||||||
{
|
{
|
||||||
if (filter.endsWith(HINT_CQ_SUFFIX))
|
if (filter.endsWith(HINT_CQ_SUFFIX))
|
||||||
{
|
{
|
||||||
useCQ = true;
|
useCQ = honorHintUseCQ;
|
||||||
filter = filter.substring(0, filter.length()-HINT_CQ_SUFFIX.length());
|
filter = filter.substring(0, filter.length()-HINT_CQ_SUFFIX.length());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user