Changeset 28955

Show
Ignore:
Timestamp:
31.03.2014 11:34:26 (6 years ago)
Author:
kjdon
Message:

now we read in indexsortfieldmap and defaultsortfield, so the user can change the default sort field

Location:
main/trunk/greenstone2/runtime-src/src/colservr
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/colservr/lucenequeryfilter.cpp

    r27361 r28955  
    8080    ((lucenesearchclass *)textsearchptr)->set_text_level(cfgline[0]); 
    8181  } 
    82    
     82  else if (key == "indexsortfieldmap") { 
     83    sortfieldmap.importmap (cfgline); 
     84  } 
    8385  else if (key == "indexsortfields") { 
    8486  filterOptions["SortField"].validValues.erase(filterOptions["SortField"].validValues.begin(), filterOptions["SortField"].validValues.end()); 
     
    9193      ++here; 
    9294    } 
     95  } 
     96  else if (key == "defaultsortfield") {  
     97    sortfieldmap.from2to (cfgline[0], filterOptions["SortField"].defaultValue); 
    9398  } 
    9499} 
  • main/trunk/greenstone2/runtime-src/src/colservr/lucenequeryfilter.h

    r27084 r28955  
    3535protected: 
    3636 
     37  stringmap sortfieldmap; 
    3738 
    3839  // mgsearchptr and db_ptr are assumed to be valid