Browse files

Merge pull request #111 from atmire/DS-1248

[DS-1248] Remove unused SolrLogger code for unsupported "metadata.item." settings
  • Loading branch information...
2 parents deac1b0 + 1159f33 commit adf05dd7dd4f035ea56b5bc83d964fa739ed8c8c @KevinVdV KevinVdV committed Oct 31, 2012
Showing with 0 additions and 38 deletions.
  1. +0 −38 dspace-api/src/main/java/org/dspace/statistics/SolrLogger.java
View
38 dspace-api/src/main/java/org/dspace/statistics/SolrLogger.java
@@ -78,8 +78,6 @@
private static final boolean useProxies;
- private static Map<String, String> metadataStorageInfo;
-
private static List<String> statisticYearCores = new ArrayList<String>();
public static enum StatisticsType {
@@ -179,19 +177,6 @@ public boolean accept(File file) {
}
log.info("useProxies=" + useProxies);
-
- metadataStorageInfo = new HashMap<String, String>();
- int count = 1;
- String metadataVal;
- while ((metadataVal = ConfigurationManager.getProperty("solr-statistics","metadata.item." + count)) != null)
- {
- String storeVal = metadataVal.split(":")[0];
- String metadataField = metadataVal.split(":")[1];
-
- metadataStorageInfo.put(storeVal, metadataField);
- log.info("solr-statistics.metadata.item." + count + "=" + metadataVal);
- count++;
- }
}
/**
@@ -228,29 +213,6 @@ public static void postView(DSpaceObject dspaceObject, HttpServletRequest reques
{
SolrInputDocument doc1 = getCommonSolrDoc(dspaceObject, request, currentUser);
if (doc1 == null) return;
-
- if (dspaceObject instanceof Item)
- {
- Item item = (Item) dspaceObject;
- // Store the metadata
- for (Object storedField : metadataStorageInfo.keySet())
- {
- String dcField = metadataStorageInfo
- .get(storedField);
-
- DCValue[] vals = item.getMetadata(dcField.split("\\.")[0],
- dcField.split("\\.")[1], dcField.split("\\.")[2],
- Item.ANY);
- for (DCValue val1 : vals)
- {
- String val = val1.value;
- doc1.addField(String.valueOf(storedField), val);
- doc1.addField(storedField + "_search", val
- .toLowerCase());
- }
- }
- }
-
if(dspaceObject instanceof Bitstream)
{
Bitstream bit = (Bitstream) dspaceObject;

0 comments on commit adf05dd

Please sign in to comment.