updates to dynamic fields etc. for search, enable parameter to remove space for dynamic field
This commit is contained in:
parent
28ce7ce277
commit
dad9430c2f
2 changed files with 10 additions and 7 deletions
|
@ -253,7 +253,7 @@
|
|||
|
||||
<!-- **************************** End Vitro Fields *************************** -->
|
||||
<!-- **************************** Dynamic Fields *************************** -->
|
||||
<dynamicField name="*_string" type="string" indexed="true" stored="true" />
|
||||
<dynamicField name="*_string" type="string" indexed="true" stored="true" multiValued="true"/>
|
||||
<!-- **************************** End Dynamic Fields *************************** -->
|
||||
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ public class ContextNodeFields implements DocumentModifier{
|
|||
ResultSet results = RDFServiceUtils.sparqlSelectQuery(subInUriQuery, rdfService);
|
||||
while(results.hasNext()){
|
||||
valuesForQuery.append(
|
||||
getTextForRow( results.nextSolution() ) ) ;
|
||||
getTextForRow( results.nextSolution(), true ) ) ;
|
||||
}
|
||||
|
||||
}catch(Throwable t){
|
||||
|
@ -114,7 +114,7 @@ public class ContextNodeFields implements DocumentModifier{
|
|||
return allValues;
|
||||
}
|
||||
|
||||
protected String getTextForRow( QuerySolution row){
|
||||
protected String getTextForRow( QuerySolution row, boolean addSpace){
|
||||
if( row == null )
|
||||
return "";
|
||||
|
||||
|
@ -124,7 +124,11 @@ public class ContextNodeFields implements DocumentModifier{
|
|||
String name = iter.next();
|
||||
RDFNode node = row.get( name );
|
||||
if( node != null ){
|
||||
if(addSpace) {
|
||||
text.append(" ").append( node.toString() );
|
||||
} else {
|
||||
text.append(node.toString());
|
||||
}
|
||||
}else{
|
||||
log.debug(name + " is null");
|
||||
}
|
||||
|
@ -132,7 +136,6 @@ public class ContextNodeFields implements DocumentModifier{
|
|||
return text.toString();
|
||||
}
|
||||
|
||||
|
||||
public void shutdown(){
|
||||
shutdown=true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue