mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix for ALF-10641 SOLR tracking fails for residual properties when there is no model that defines the prefix for the URI
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31085 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -27,6 +27,7 @@ import java.io.UnsupportedEncodingException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
@@ -513,9 +514,25 @@ public class SOLRTrackingComponentImpl implements SOLRTrackingComponent
|
||||
|
||||
if(includeProperties)
|
||||
{
|
||||
props = nodeDAO.getNodeProperties(nodeId);
|
||||
// ALF-10641
|
||||
// Residual properties are un-indexed -> break serlialisation
|
||||
Map<QName, Serializable> sourceProps = nodeDAO.getNodeProperties(nodeId);
|
||||
props = new HashMap<QName, Serializable>((int)(sourceProps.size() * 1.3));
|
||||
for(QName propertyQName : sourceProps.keySet())
|
||||
{
|
||||
PropertyDefinition propDef = dictionaryService.getProperty(propertyQName);
|
||||
if(propDef != null)
|
||||
{
|
||||
props.put(propertyQName, sourceProps.get(propertyQName));
|
||||
}
|
||||
}
|
||||
nodeMetaData.setProperties(props);
|
||||
}
|
||||
nodeMetaData.setProperties(props);
|
||||
else
|
||||
{
|
||||
nodeMetaData.setProperties(Collections.<QName, Serializable>emptyMap());
|
||||
}
|
||||
|
||||
|
||||
if(includeAspects)
|
||||
{
|
||||
|
Reference in New Issue
Block a user