mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
85015: Merged PLATFORM1 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud) 84136: Fix for ACE-1696 SOLR 4 - Support for name path - index only git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@85330 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -101,6 +101,15 @@
|
|||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
</#if>
|
</#if>
|
||||||
|
<#if filter.includePaths??>
|
||||||
|
<#if nodeMetaData.namePaths??>
|
||||||
|
, "namePaths": [
|
||||||
|
<#list nodeMetaData.namePaths as namePath>
|
||||||
|
${namePath}<#if namePath_has_next>,</#if>
|
||||||
|
</#list>
|
||||||
|
]
|
||||||
|
</#if>
|
||||||
|
</#if>
|
||||||
<#if filter.includeParentAssociations??>
|
<#if filter.includeParentAssociations??>
|
||||||
<#if nodeMetaData.parentAssocs??>
|
<#if nodeMetaData.parentAssocs??>
|
||||||
<#if (nodeMetaData.parentAssocs?size > 0)>
|
<#if (nodeMetaData.parentAssocs?size > 0)>
|
||||||
|
@@ -21,6 +21,7 @@ package org.alfresco.repo.web.scripts.solr;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@@ -285,8 +286,25 @@ public class NodesMetaDataGet extends DeclarativeWebScript
|
|||||||
}
|
}
|
||||||
this.ancestors = ancestors;
|
this.ancestors = ancestors;
|
||||||
this.paths = paths;
|
this.paths = paths;
|
||||||
// TODO: Convert name paths to required strings
|
|
||||||
this.namePaths = null; // TODO: use a JSON-friendly string
|
|
||||||
|
// convert name Paths to Strings
|
||||||
|
List<String> namePaths = new ArrayList<String>();
|
||||||
|
if(nodeMetaData.getNamePaths() != null)
|
||||||
|
{
|
||||||
|
for(Collection<String> namePath : nodeMetaData.getNamePaths())
|
||||||
|
{
|
||||||
|
JSONObject o = new JSONObject();
|
||||||
|
JSONArray array = new JSONArray();
|
||||||
|
for(String element : namePath)
|
||||||
|
{
|
||||||
|
array.put(solrSerializer.serializeValue(String.class, element));
|
||||||
|
}
|
||||||
|
o.put("namePath", array);
|
||||||
|
namePaths.add(o.toString(3));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.namePaths = namePaths;
|
||||||
|
|
||||||
this.owner = nodeMetaData.getOwner();
|
this.owner = nodeMetaData.getOwner();
|
||||||
this.childAssocs = nodeMetaData.getChildAssocs();
|
this.childAssocs = nodeMetaData.getChildAssocs();
|
||||||
@@ -331,6 +349,10 @@ public class NodesMetaDataGet extends DeclarativeWebScript
|
|||||||
{
|
{
|
||||||
return paths;
|
return paths;
|
||||||
}
|
}
|
||||||
|
public List<String> getNamePaths()
|
||||||
|
{
|
||||||
|
return namePaths;
|
||||||
|
}
|
||||||
public QName getNodeType()
|
public QName getNodeType()
|
||||||
{
|
{
|
||||||
return nodeType;
|
return nodeType;
|
||||||
|
Reference in New Issue
Block a user