Skip to content
This repository

[DS-1248] Remove unused SolrLogger code for unsupported "metadata.item." settings #111

Merged
merged 1 commit into from over 1 year ago

1 participant

Kevin Van de Velde
Kevin Van de Velde
Owner

No description provided.

Kevin Van de Velde KevinVdV merged commit adf05dd into from
helix84 helix84 referenced this pull request from a commit in helix84/DSpace
helix84 helix84 fix build failure introduced by pull #111 b10be85
Hardy Pottinger hardyoyo referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Art Lowel artlowel referenced this pull request from a commit in atmire/DSpace
helix84 helix84 fix build failure introduced by pull #111 8e58b5a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Oct 25, 2012
Kevin Van de Velde KevinVdV [DS-1248] Remove unused SolrLogger code for unsupported "metadata.ite…
…m." settings
1159f33
This page is out of date. Refresh to see the latest.
38 dspace-api/src/main/java/org/dspace/statistics/SolrLogger.java
@@ -78,8 +78,6 @@
78 78
79 79 private static final boolean useProxies;
80 80
81   - private static Map<String, String> metadataStorageInfo;
82   -
83 81 private static List<String> statisticYearCores = new ArrayList<String>();
84 82
85 83 public static enum StatisticsType {
@@ -179,19 +177,6 @@ public boolean accept(File file) {
179 177 }
180 178
181 179 log.info("useProxies=" + useProxies);
182   -
183   - metadataStorageInfo = new HashMap<String, String>();
184   - int count = 1;
185   - String metadataVal;
186   - while ((metadataVal = ConfigurationManager.getProperty("solr-statistics","metadata.item." + count)) != null)
187   - {
188   - String storeVal = metadataVal.split(":")[0];
189   - String metadataField = metadataVal.split(":")[1];
190   -
191   - metadataStorageInfo.put(storeVal, metadataField);
192   - log.info("solr-statistics.metadata.item." + count + "=" + metadataVal);
193   - count++;
194   - }
195 180 }
196 181
197 182 /**
@@ -228,29 +213,6 @@ public static void postView(DSpaceObject dspaceObject, HttpServletRequest reques
228 213 {
229 214 SolrInputDocument doc1 = getCommonSolrDoc(dspaceObject, request, currentUser);
230 215 if (doc1 == null) return;
231   -
232   - if (dspaceObject instanceof Item)
233   - {
234   - Item item = (Item) dspaceObject;
235   - // Store the metadata
236   - for (Object storedField : metadataStorageInfo.keySet())
237   - {
238   - String dcField = metadataStorageInfo
239   - .get(storedField);
240   -
241   - DCValue[] vals = item.getMetadata(dcField.split("\\.")[0],
242   - dcField.split("\\.")[1], dcField.split("\\.")[2],
243   - Item.ANY);
244   - for (DCValue val1 : vals)
245   - {
246   - String val = val1.value;
247   - doc1.addField(String.valueOf(storedField), val);
248   - doc1.addField(storedField + "_search", val
249   - .toLowerCase());
250   - }
251   - }
252   - }
253   -
254 216 if(dspaceObject instanceof Bitstream)
255 217 {
256 218 Bitstream bit = (Bitstream) dspaceObject;

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.