From edcf7f708ea2289d24d46b088be00a73c2193bda Mon Sep 17 00:00:00 2001 From: briancaruso Date: Fri, 6 Jul 2012 19:28:55 +0000 Subject: [PATCH] class based search boost NIHVIVO-3876 --- .../documentBuilding/IndividualToSolrDocument.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 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 65fc13f4c..0bd4c3ef1 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 @@ -60,14 +60,17 @@ public class IndividualToSolrDocument { //vitro id doc.addField(term.URI, ind.getURI()); - + log.debug(ind.getURI() + " init boost: " + doc.getDocumentBoost()); + //get label from ind addLabel(ind, doc); //add classes, classgroups get if prohibited because of its class StringBuffer classPublicNames = new StringBuffer(""); addClasses(ind, doc, classPublicNames); - + + log.debug(ind.getURI() + " post class boost: " + doc.getDocumentBoost()); + // collecting URIs and rdfs:labels of objects of statements StringBuffer objectNames = new StringBuffer(""); StringBuffer addUri = new StringBuffer(""); @@ -83,8 +86,12 @@ public class IndividualToSolrDocument { doc.setDocumentBoost(ind.getSearchBoost()); } + log.debug(ind.getURI() + " pre mod boost: " + doc.getDocumentBoost()); + runAdditionalDocModifers(ind,doc,addUri); + log.debug(ind.getURI() + " post mod boost: " + doc.getDocumentBoost()); + return doc; }catch(SkipIndividualException ex){ //indicates that this individual should not be indexed by returning null