@ -32,6 +32,7 @@ import java.util.ArrayList;
import java.util.Arrays ;
import java.util.Comparator ;
import java.util.HashMap ;
import java.util.HashSet ;
import java.util.Iterator ;
import java.util.Map ;
import java.util.Set ;
@ -65,7 +66,7 @@ public final class plasmaSearchRankingProcess {
private final SortStack < WordReferenceVars > stack ;
private final HashMap < String , SortStack < WordReferenceVars > > doubleDomCache ; // key = domhash (6 bytes); value = like stack
private final Hash Map< String , String > handover ; // key = urlhash , value = urlstring ; used for double-check of urls that had been handed over to search process
private final Hash Set< String > handover ; // key = urlhash ; used for double-check of urls that had been handed over to search process
private final plasmaSearchQuery query ;
private final int maxentries ;
private int remote_peerCount , remote_indexCount , remote_resourceSize , local_resourceSize ;
@ -91,7 +92,7 @@ public final class plasmaSearchRankingProcess {
this . localSearchInclusion = null ;
this . stack = new SortStack < WordReferenceVars > ( maxentries ) ;
this . doubleDomCache = new HashMap < String , SortStack < WordReferenceVars > > ( ) ;
this . handover = new Hash Map< String , String > ( ) ;
this . handover = new Hash Set< String > ( ) ;
this . order = ( query = = null ) ? null : new ReferenceOrder ( query . ranking , query . targetlang ) ;
this . query = query ;
this . maxentries = maxentries ;
@ -330,7 +331,7 @@ public final class plasmaSearchRankingProcess {
if ( author ! = null & & author . length ( ) > 0 ) {
// add author to the author navigator
String authorhash = new String ( Word . word2hash ( author ) ) ;
System . out . println ( "*** DEBUG authorhash = " + authorhash + ", query.authorhash = " + this . query . authorhash + ", author = " + author ) ;
//System.out.println("*** DEBUG authorhash = " + authorhash + ", query.authorhash = " + this.query.authorhash + ", author = " + author);
// check if we already are filtering for authors
if ( this . query . authorhash ! = null & & ! this . query . authorhash . equals ( authorhash ) ) {
@ -353,7 +354,7 @@ public final class plasmaSearchRankingProcess {
if ( metadata . url ( ) ! = null ) {
String urlstring = metadata . url ( ) . toNormalform ( true , true ) ;
if ( urlstring = = null | | ! urlstring . matches ( query . urlMask ) ) continue ;
this . handover . put( u . hash ( ) , metadata . url ( ) . toNormalform ( true , false ) ) ; // remember that we handed over this url
this . handover . add( u . hash ( ) ) ; // remember that we handed over this url
return u ;
}
}