class based search boost NIHVIVO-3876

This commit is contained in:
briancaruso 2012-07-06 19:28:55 +00:00
parent 7be0f8ddea
commit edcf7f708e

View file

@ -60,14 +60,17 @@ public class IndividualToSolrDocument {
//vitro id //vitro id
doc.addField(term.URI, ind.getURI()); doc.addField(term.URI, ind.getURI());
log.debug(ind.getURI() + " init boost: " + doc.getDocumentBoost());
//get label from ind //get label from ind
addLabel(ind, doc); addLabel(ind, doc);
//add classes, classgroups get if prohibited because of its class //add classes, classgroups get if prohibited because of its class
StringBuffer classPublicNames = new StringBuffer(""); StringBuffer classPublicNames = new StringBuffer("");
addClasses(ind, doc, classPublicNames); addClasses(ind, doc, classPublicNames);
log.debug(ind.getURI() + " post class boost: " + doc.getDocumentBoost());
// collecting URIs and rdfs:labels of objects of statements // collecting URIs and rdfs:labels of objects of statements
StringBuffer objectNames = new StringBuffer(""); StringBuffer objectNames = new StringBuffer("");
StringBuffer addUri = new StringBuffer(""); StringBuffer addUri = new StringBuffer("");
@ -83,8 +86,12 @@ public class IndividualToSolrDocument {
doc.setDocumentBoost(ind.getSearchBoost()); doc.setDocumentBoost(ind.getSearchBoost());
} }
log.debug(ind.getURI() + " pre mod boost: " + doc.getDocumentBoost());
runAdditionalDocModifers(ind,doc,addUri); runAdditionalDocModifers(ind,doc,addUri);
log.debug(ind.getURI() + " post mod boost: " + doc.getDocumentBoost());
return doc; return doc;
}catch(SkipIndividualException ex){ }catch(SkipIndividualException ex){
//indicates that this individual should not be indexed by returning null //indicates that this individual should not be indexed by returning null