mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged 5.2.N (5.2.1) to HEAD (5.2)
130285 gjames: Merged searchapi (5.2.1) to 5.2.N (5.2.1) 130022 gjames: Merged 5.2.N-AHIND (5.2.1) to searchapi (5.2.1) 129926 ahind: SEARCH-31 SOLR 6 - Shard based on date - SOLR implementation - Support returning a date, datetime or string property to use for sharding git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@130357 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -34,7 +34,8 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.domain.node.Node;
|
||||
import org.alfresco.repo.domain.qname.QNameDAO;
|
||||
import org.alfresco.repo.domain.qname.QNameDAO;
|
||||
import org.alfresco.repo.search.impl.QueryParserUtils;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.solr.NodeParameters;
|
||||
import org.alfresco.repo.solr.SOLRTrackingComponent;
|
||||
@@ -165,6 +166,8 @@ public class NodesGet extends DeclarativeWebScript
|
||||
txnIds.add(aTxnIds.getLong(i));
|
||||
}
|
||||
}
|
||||
|
||||
String shardProperty = o.has("shardProperty") ? o.getString("shardProperty") : null;
|
||||
|
||||
NodeParameters nodeParameters = new NodeParameters();
|
||||
nodeParameters.setTransactionIds(txnIds);
|
||||
@@ -175,7 +178,8 @@ public class NodesGet extends DeclarativeWebScript
|
||||
nodeParameters.setExcludeAspects(excludeAspects);
|
||||
nodeParameters.setIncludeAspects(includeAspects);
|
||||
nodeParameters.setExcludeNodeTypes(excludeNodeTypes);
|
||||
nodeParameters.setIncludeNodeTypes(includeNodeTypes);
|
||||
nodeParameters.setIncludeNodeTypes(includeNodeTypes);
|
||||
nodeParameters.setShardProperty(shardProperty);
|
||||
|
||||
StoreRef storeRef = null;
|
||||
|
||||
@@ -225,7 +229,8 @@ public class NodesGet extends DeclarativeWebScript
|
||||
private final boolean isDeleted;
|
||||
private final String nodeRef;
|
||||
private final String tenant;
|
||||
private final Long aclId;
|
||||
private final Long aclId;
|
||||
private final String shardPropertyValue;
|
||||
|
||||
public NodeRecord(Node node, QNameDAO qnameDAO, TenantService tenantService)
|
||||
{
|
||||
@@ -234,7 +239,8 @@ public class NodesGet extends DeclarativeWebScript
|
||||
this.isDeleted = node.getNodeStatus(qnameDAO).isDeleted();
|
||||
this.nodeRef = node.getNodeRef().toString();
|
||||
this.tenant = tenantService.getDomain(node.getNodeRef().getStoreRef().getIdentifier());
|
||||
this.aclId = node.getAclId();
|
||||
this.aclId = node.getAclId();
|
||||
this.shardPropertyValue = node.getShardKey();
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
@@ -265,9 +271,12 @@ public class NodesGet extends DeclarativeWebScript
|
||||
public Long getAclId()
|
||||
{
|
||||
return aclId;
|
||||
}
|
||||
|
||||
public String getShardPropertyValue()
|
||||
{
|
||||
return this.shardPropertyValue;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user