@ -183,7 +183,7 @@ public class URIMetadataNode extends SolrDocument /* implements Comparable<URIMe
public URIMetadataNode ( final SolrDocument doc ) throws MalformedURLException {
public URIMetadataNode ( final SolrDocument doc ) throws MalformedURLException {
super ( ) ;
super ( ) ;
for ( String name : doc . getFieldNames ( ) ) {
for ( String name : doc . getFieldNames ( ) ) {
this . add Field( name , doc . getFieldValue ( name ) ) ;
this . set Field( name , doc . getFieldValue ( name ) ) ;
}
}
/ * score shall contain the YaCy score , getFieldValue ( "score" ) moved to
/ * score shall contain the YaCy score , getFieldValue ( "score" ) moved to
* SearchEvent . addNodes ( ) where the YaCy ranking for nodes is calculated
* SearchEvent . addNodes ( ) where the YaCy ranking for nodes is calculated
@ -196,12 +196,12 @@ public class URIMetadataNode extends SolrDocument /* implements Comparable<URIMe
if ( ! hashstr . isEmpty ( ) ) { // remote id might not correspond in all cases
if ( ! hashstr . isEmpty ( ) ) { // remote id might not correspond in all cases
final String myhash = ASCII . String ( this . url . hash ( ) ) ;
final String myhash = ASCII . String ( this . url . hash ( ) ) ;
if ( ! hashstr . equals ( myhash ) ) {
if ( ! hashstr . equals ( myhash ) ) {
this . add Field( CollectionSchema . id . getSolrFieldName ( ) , myhash ) ;
this . set Field( CollectionSchema . id . getSolrFieldName ( ) , myhash ) ;
ConcurrentLog . fine ( "URIMetadataNode" , "updated document.ID of " + urlRaw + " from " + hashstr + " to " + myhash ) ;
ConcurrentLog . fine ( "URIMetadataNode" , "updated document.ID of " + urlRaw + " from " + hashstr + " to " + myhash ) ;
// ususally the hosthash matches but just to be on the safe site
// ususally the hosthash matches but just to be on the safe site
final String hostidstr = getString ( CollectionSchema . host_id_s ) ; // id or empty string
final String hostidstr = getString ( CollectionSchema . host_id_s ) ; // id or empty string
if ( ! hostidstr . isEmpty ( ) & & ! hostidstr . equals ( this . url . hosthash ( ) ) ) {
if ( ! hostidstr . isEmpty ( ) & & ! hostidstr . equals ( this . url . hosthash ( ) ) ) {
this . add Field( CollectionSchema . host_id_s . getSolrFieldName ( ) , this . url . hosthash ( ) ) ;
this . set Field( CollectionSchema . host_id_s . getSolrFieldName ( ) , this . url . hosthash ( ) ) ;
}
}
}
}
}
}