This commit is contained in:
anupsawant 2011-06-01 00:12:33 +00:00
parent c45a7fe83d
commit 83d082ca23
2 changed files with 21 additions and 14 deletions

View file

@ -496,7 +496,7 @@ public class ContextNodeFields implements DocumentModifier{
RDFNode linkedAuthor = soln.get("linkedAuthor"); RDFNode linkedAuthor = soln.get("linkedAuthor");
if(linkedAuthor != null){ if(linkedAuthor != null){
propertyValues.append(" publications " + linkedAuthor.toString()); propertyValues.append(" publications " + linkedAuthor.toString() + " publications ");
}else{ }else{
log.debug("linkedAuthor is null "); log.debug("linkedAuthor is null ");
} }
@ -531,7 +531,7 @@ public class ContextNodeFields implements DocumentModifier{
RDFNode features = soln.get("features"); RDFNode features = soln.get("features");
if(features != null){ if(features != null){
propertyValues.append(" publications " + features.toString()); propertyValues.append(" publications " + features.toString() + " publications ");
}else{ }else{
log.debug("features is null "); log.debug("features is null ");
} }

View file

@ -206,19 +206,28 @@ public class IndividualToSolrDocument implements Obj2DocIface {
} }
} }
if(documentModifiers == null){
doc.addField(term.NAME_RAW, value, NAME_BOOST); doc.addField(term.NAME_RAW, value, NAME_BOOST);
doc.addField(term.NAME_LOWERCASE, value.toLowerCase(),NAME_BOOST); doc.addField(term.NAME_LOWERCASE, value.toLowerCase(),NAME_BOOST);
doc.addField(term.NAME_UNSTEMMED, value,NAME_BOOST); doc.addField(term.NAME_UNSTEMMED, value,NAME_BOOST);
doc.addField(term.NAME_STEMMED, value, NAME_BOOST); doc.addField(term.NAME_STEMMED, value, NAME_BOOST);
doc.addField(term.NAME_PHONETIC, value, PHONETIC_BOOST); doc.addField(term.NAME_PHONETIC, value, PHONETIC_BOOST);
}else{
doc.addField(term.NAME_RAW, value);
doc.addField(term.NAME_LOWERCASE, value.toLowerCase());
doc.addField(term.NAME_UNSTEMMED, value);
doc.addField(term.NAME_STEMMED, value);
doc.addField(term.NAME_PHONETIC, value, PHONETIC_BOOST);
}
long tMoniker = System.currentTimeMillis(); long tMoniker = System.currentTimeMillis();
if(documentModifiers == null){
//boost for entity //boost for entity
if(ent.getSearchBoost() != null && ent.getSearchBoost() != 0) if(ent.getSearchBoost() != null && ent.getSearchBoost() != 0)
doc.setDocumentBoost(ent.getSearchBoost()); doc.setDocumentBoost(ent.getSearchBoost());
}
//thumbnail //thumbnail
try{ try{
@ -268,9 +277,9 @@ public class IndividualToSolrDocument implements Obj2DocIface {
log.debug("time to include data property statements, object property statements in the index: " + Long.toString(System.currentTimeMillis() - tPropertyStatements)); log.debug("time to include data property statements, object property statements in the index: " + Long.toString(System.currentTimeMillis() - tPropertyStatements));
String alltext = allTextValue.toString(); String alltext = allTextValue.toString();
doc.addField(term.ALLTEXT, alltext, ALL_TEXT_BOOST); doc.addField(term.ALLTEXT, alltext);
doc.addField(term.ALLTEXTUNSTEMMED, alltext, ALL_TEXT_BOOST); doc.addField(term.ALLTEXTUNSTEMMED, alltext);
doc.addField(term.ALLTEXT_PHONETIC, alltext, PHONETIC_BOOST); doc.addField(term.ALLTEXT_PHONETIC, alltext);
//run the document modifiers //run the document modifiers
if( documentModifiers != null ){ if( documentModifiers != null ){
@ -284,9 +293,7 @@ public class IndividualToSolrDocument implements Obj2DocIface {
return doc; return doc;
} }
/*
* Method for calculation of PHI for a doc.
*/