From fd91aa4580e7c76b93f75ca1c9084a272302c0fc Mon Sep 17 00:00:00 2001 From: j2blake Date: Fri, 11 Oct 2013 15:46:31 -0400 Subject: [PATCH] VIVO-70 Create a DocumentModifier to handle PreferredTitle Preferred Title is no longer a property. Instead use Title from the VCard. --- .../solr/documentBuilding/IndividualToSolrDocument.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/search/solr/documentBuilding/IndividualToSolrDocument.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/search/solr/documentBuilding/IndividualToSolrDocument.java index 17cf5e15c..7d4eaa4f3 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/search/solr/documentBuilding/IndividualToSolrDocument.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/search/solr/documentBuilding/IndividualToSolrDocument.java @@ -100,9 +100,7 @@ public class IndividualToSolrDocument { log.debug(ex); return null; }catch(Exception th){ - //Odd exceptions can get thrown on shutdown - if( log != null ) - log.error(th,th); + log.error(th,th); return null; } } @@ -171,11 +169,6 @@ public class IndividualToSolrDocument { DataPropertyStatement dataPropertyStmt = dataPropertyStmtIter.next(); if(dataPropertyStmt.getDatapropURI().equals(label)){ // we don't want label to be added to alltext continue; - } else if(dataPropertyStmt.getDatapropURI().equals("http://vivoweb.org/ontology/core#preferredTitle")){ - //add the preferredTitle field - String preferredTitle = null; - doc.addField(term.PREFERRED_TITLE, ((preferredTitle=dataPropertyStmt.getData()) == null)?"":preferredTitle); - log.debug("Preferred Title: " + dataPropertyStmt.getData()); } allTextValue.append(" "); allTextValue.append(((t=dataPropertyStmt.getData()) == null)?"":t);