Skip to content

Commit

Permalink
Merge pull request IQSS#14 from IQSS/master
Browse files Browse the repository at this point in the history
swap order of methods within indexAll IQSS#4062
  • Loading branch information
kcondon committed Jun 20, 2014
2 parents 3ef810d + 46ddb55 commit 9d7f6d8
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions src/main/java/edu/harvard/iq/dataverse/IndexServiceBean.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,23 +77,6 @@ public String indexAll() {
return ex.toString();
}

List<Dataverse> dataverses = dataverseService.findAll();
int dataverseIndexCount = 0;
for (Dataverse dataverse : dataverses) {
logger.info("indexing dataverse " + dataverseIndexCount + " of " + dataverses.size() + ": " + indexDataverse(dataverse));
dataverseIndexCount++;
}

int datasetIndexCount = 0;
List<Dataset> datasets = datasetService.findAll();
for (Dataset dataset : datasets) {
datasetIndexCount++;
logger.info("indexing dataset " + datasetIndexCount + " of " + datasets.size() + ": " + indexDataset(dataset));
}
// logger.info("advanced search fields: " + advancedSearchFields);
// logger.info("not advanced search fields: " + notAdvancedSearchFields);
logger.info("done iterating through all datasets");

/**
* @todo: replace hard-coded groups with real groups
*/
Expand All @@ -114,6 +97,22 @@ public String indexAll() {
userIndexCount++;
logger.info("indexing user " + userIndexCount + " of several: " + indexUser(user));
}
List<Dataverse> dataverses = dataverseService.findAll();
int dataverseIndexCount = 0;
for (Dataverse dataverse : dataverses) {
logger.info("indexing dataverse " + dataverseIndexCount + " of " + dataverses.size() + ": " + indexDataverse(dataverse));
dataverseIndexCount++;
}

int datasetIndexCount = 0;
List<Dataset> datasets = datasetService.findAll();
for (Dataset dataset : datasets) {
datasetIndexCount++;
logger.info("indexing dataset " + datasetIndexCount + " of " + datasets.size() + ": " + indexDataset(dataset));
}
// logger.info("advanced search fields: " + advancedSearchFields);
// logger.info("not advanced search fields: " + notAdvancedSearchFields);
logger.info("done iterating through all datasets");

return dataverseIndexCount + " dataverses, " + datasetIndexCount + " datasets, " + groupIndexCount + " groups, and " + userIndexCount + " users indexed\n";
}
Expand Down

0 comments on commit 9d7f6d8

Please sign in to comment.