AnsweredAssumed Answered

searchService returns same nodeRef twice (duplicate index in solr)

Question asked by vincent-kali on Jun 14, 2017
Latest reply on Sep 20, 2017 by andy1

Dear all,

For some reason, we're using a custom REST API to perform searches on repo (alf community 5.1.g). We discovered that "sometimes", this custom API returns the same nodeRef more than once.

Search code is below:


ResultSet resultSet = null;
 List<NodeRef> results = null;
    SearchParameters sp = new SearchParameters();
    sp.addStore(new StoreRef("workspace://SpacesStore"));
    SortDefinition sortDefinition = new SortDefinition(
    SearchParameters.SortDefinition.SortType.FIELD, "@" + sortField, sortAscending);
    logger.debug(" search - query: " + sp.getQuery());
    resultSet =;
    logger.debug("Results found: " + resultSet.getNumberFound());
    results = resultSet.getNodeRefs();
    if(resultSet != null)
 return results;



The solr4 report indicates: "Count of duplicate nodes in the index":"100", meaning that there is errors in solr4 indexes.

1) Does somebody know how to fix this ?

2) When running the same query using "alfresco/service/slingshot/node/search" API, only one result is returned. Does it means that a duplicate check in performed within java node (I did not find anything in code related to this)