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,12 +241,16 @@ public final class SearchContext implements Serializable
|
|||||||
if (location != null)
|
if (location != null)
|
||||||
{
|
{
|
||||||
pathQuery.append(" PATH:\"").append(location).append("\" ");
|
pathQuery.append(" PATH:\"").append(location).append("\" ");
|
||||||
|
if (categories != null && categories.length != 0)
|
||||||
|
{
|
||||||
|
pathQuery.append("AND");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (categories != null && categories.length != 0)
|
if (categories != null && categories.length != 0)
|
||||||
{
|
{
|
||||||
for (int i=0; i<categories.length; i++)
|
for (int i=0; i<categories.length; i++)
|
||||||
{
|
{
|
||||||
if (pathQuery.length() != 0)
|
if (i > 0)
|
||||||
{
|
{
|
||||||
pathQuery.append("OR");
|
pathQuery.append("OR");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user