Changeset 32716

Show
Ignore:
Timestamp:
19.12.2018 14:14:46 (3 months ago)
Author:
kjdon
Message:

params are cached in a user's session per collection, or for eg cross collection search, by the service name. This lead to problems when doing cross collection search, the params eg query string, are cached under TextQuery?, but when we view a document, we are getting the params form the colleciton cache. so teh query string is either not there or wrong, and search term highlighting either doesn't work or highlights the wrong things. now we can pass a cgi parameter, ck for 'cache key' - use that to get cached params instead of colleciton name. ccs searches need to pass that param to document links.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/LibraryServlet.java

    r32447 r32716  
    549549        String document = getFirstParam(GSParams.DOCUMENT, queryMap); 
    550550        String service = getFirstParam(GSParams.SERVICE, queryMap); 
     551        String specified_cache_key = getFirstParam(GSParams.CACHE_KEY, queryMap); 
    551552 
    552553        // We clean up the cache session_ids_table if system 
     
    604605 
    605606        // cache_key is the collection name, or service name 
    606         String cache_key = collection; 
     607        String cache_key = specified_cache_key; 
    607608        if (cache_key == null || cache_key.equals("")) 
     609          { 
     610            cache_key = collection; 
     611          } 
     612        if (cache_key == null || cache_key.equals("")) 
    608613        { 
    609614            cache_key = service; 
    610615        } 
    611  
     616         
    612617        // logger.info("should_cache= " + should_cache); 
    613618 
     
    634639                session_cache = session_ids_table.get(sid); 
    635640                param_table = session_cache.getParamsTable(); 
    636                 logger.info("collections in table: " + tableToString(param_table)); 
    637641                if (param_table.containsKey(cache_key)) 
    638642                {