mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
. Fix for AWC-498
- Searching for results in a Location (e.g. PATH) and category are now ANDed together rather than ORed git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2300 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -241,16 +241,20 @@ public final class SearchContext implements Serializable
|
||||
if (location != null)
|
||||
{
|
||||
pathQuery.append(" PATH:\"").append(location).append("\" ");
|
||||
if (categories != null && categories.length != 0)
|
||||
{
|
||||
pathQuery.append("AND");
|
||||
}
|
||||
}
|
||||
if (categories != null && categories.length != 0)
|
||||
{
|
||||
for (int i=0; i<categories.length; i++)
|
||||
{
|
||||
if (pathQuery.length() != 0)
|
||||
if (i > 0)
|
||||
{
|
||||
pathQuery.append("OR");
|
||||
}
|
||||
pathQuery.append(" PATH:\"").append(categories[i]).append("\" ");
|
||||
pathQuery.append(" PATH:\"").append(categories[i]).append("\" ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user