@ -106,27 +106,31 @@ public class yacysearchtrailer {
// attach always the topics
// attach always the topics
ArrayList < NavigatorEntry > topicNavigator = theSearch . getTopicNavigator ( 10 ) ;
ArrayList < NavigatorEntry > topicNavigator = theSearch . getTopicNavigator ( 10 ) ;
if ( topicNavigator = = null ) topicNavigator = new ArrayList < NavigatorEntry > ( ) ;
if ( topicNavigator = = null | | topicNavigator . size ( ) = = 0 ) {
int i = 0 ;
topicNavigator = new ArrayList < NavigatorEntry > ( ) ;
NavigatorEntry e ;
prop . put ( "nav-topics" , "0" ) ;
Iterator < NavigatorEntry > iter = topicNavigator . iterator ( ) ;
} else {
while ( iter . hasNext ( ) ) {
prop . put ( "nav-topics" , "1" ) ;
e = iter . next ( ) ;
int i = 0 ;
if ( /*(theQuery == null) ||*/ ( theQuery . queryString = = null ) ) break ;
NavigatorEntry e ;
if ( e ! = null & & e . name ! = null ) {
Iterator < NavigatorEntry > iter = topicNavigator . iterator ( ) ;
prop . putHTML ( "nav-topics_element_" + i + "_name" , e . name ) ;
while ( iter . hasNext ( ) ) {
prop . put ( "nav-topics_element_" + i + "_url" , "<a href=\"" + QueryParams . navurl ( "html" , 0 , display , theQuery , theQuery . urlMask , e . name , theQuery . navigators ) + "\">" + e . name + " (" + e . count + ")</a>" ) ;
e = iter . next ( ) ;
prop . putJSON ( "nav-topics_element_" + i + "_url-json" , QueryParams . navurl ( "json" , 0 , display , theQuery , theQuery . urlMask , e . name , theQuery . navigators ) ) ;
if ( /*(theQuery == null) ||*/ ( theQuery . queryString = = null ) ) break ;
prop . put ( "nav-topics_element_" + i + "_count" , e . count ) ;
if ( e ! = null & & e . name ! = null ) {
prop . put ( "nav-topics_element_" + i + "_modifier" , e . name ) ;
prop . putHTML ( "nav-topics_element_" + i + "_name" , e . name ) ;
prop . put ( "nav-topics_element_" + i + "_nl" , ( iter . hasNext ( ) & & i < MAX_TOPWORDS ) ? 1 : 0 ) ;
prop . put ( "nav-topics_element_" + i + "_url" , "<a href=\"" + QueryParams . navurl ( "html" , 0 , display , theQuery , theQuery . urlMask , e . name , theQuery . navigators ) + "\">" + e . name + " (" + e . count + ")</a>" ) ;
}
prop . putJSON ( "nav-topics_element_" + i + "_url-json" , QueryParams . navurl ( "json" , 0 , display , theQuery , theQuery . urlMask , e . name , theQuery . navigators ) ) ;
if ( i + + > MAX_TOPWORDS ) {
prop . put ( "nav-topics_element_" + i + "_count" , e . count ) ;
break ;
prop . put ( "nav-topics_element_" + i + "_modifier" , e . name ) ;
prop . put ( "nav-topics_element_" + i + "_nl" , ( iter . hasNext ( ) & & i < MAX_TOPWORDS ) ? 1 : 0 ) ;
}
if ( i + + > MAX_TOPWORDS ) {
break ;
}
}
}
prop . put ( "nav-topics_element" , i ) ;
}
}
prop . put ( "nav-topics_element" , i ) ;
prop . put ( "nav-topics" , "1" ) ;
serverProfiling . update ( "SEARCH" , new ProfilingGraph . searchEvent ( theQuery . id ( true ) , SearchEvent . FINALIZATION + "-" + "bottomline" , 0 , 0 ) , false ) ;
serverProfiling . update ( "SEARCH" , new ProfilingGraph . searchEvent ( theQuery . id ( true ) , SearchEvent . FINALIZATION + "-" + "bottomline" , 0 , 0 ) , false ) ;