Fixed issues found as a result of ALF-9636: SVC 67: Lucene removal: Sanity test Share UI with Lucene turned off

Fixed ALF-9686: It's impossible to find any group at the Manage Space Users page

Fixed ALF-9673: It's impossible to find any site

Fixed ALF-9669: Site invite fails using SOLR while building email - need to remove query use in invite.

NOTE: Searches from the UI are now consistent in that by default a canned query based search (consistent results) are performed by default for people, group, user & site searches, to force a lucene based search that support the "contains" type query users must prefix their search with *, this is no longer added by default by the UI.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29628 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2011-08-09 11:35:51 +00:00
parent 5c4f984dd2
commit 6dbe542032
7 changed files with 108 additions and 52 deletions

View File

@@ -154,6 +154,43 @@ public class ScriptSiteService extends BaseScopableProcessorExtension
return (SiteServiceImpl.SITE_MANAGER.equals(role));
}
/**
* Retrieves the sites available in the repository. The returned list can optionally be filtered by name and site
* preset. If no filters are specified then all the available sites are returned.
*
* NOTE: If the filter starts with a * a Lucene based search will be performed, this may discover a wider range
* of results i.e. those sites that contain the search term as opposed to those that start with the search term,
* but newly created sites may not be found until the underlying search indexes are updated.
*
* @param filter inclusion filter for returned sites. Only sites whose cm:name OR cm:title
* OR cm:description start with the filter string will be returned.
* @param sitePresetFilter site preset filter
* @param size max results size crop if >0
* @return Site[] a list of the site filtered as appropriate
*/
public Site[] getSites(String filter, String sitePresetFilter, int size)
{
// reset filter if necessary
if (filter != null && (filter.length() == 0 || filter.equals("*")))
{
filter = null;
}
if (filter != null && (filter.startsWith("*")))
{
// findSites will add the wildcard so remove here
filter = filter.substring(1, filter.length());
// use findSites to do a "contains" search
return findSites(filter, sitePresetFilter, size);
}
else
{
// use listSites to do a canned query (will provide consistent results)
return listSites(filter, sitePresetFilter, size);
}
}
/**
* List the sites available in the repository. The returned list can optionally be filtered by name and site
* preset.