NIHVIVO-2731 - Add preferredTitle to solr schema.
This commit is contained in:
parent
5dd5fe6c45
commit
44ef90bf6a
3 changed files with 10 additions and 0 deletions
|
@ -73,4 +73,6 @@ public class VitroSearchTermNames {
|
|||
|
||||
/** source institution url */
|
||||
public static final String SITE_URL = "SITE_URL";
|
||||
/** preferred title */
|
||||
public static final String PREFERRED_TITLE = "PREFERRED_TITLE";
|
||||
}
|
||||
|
|
|
@ -165,6 +165,11 @@ 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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue