Changeset 1835


Ignore:
Timestamp:
2001-01-15T12:51:24+13:00 (23 years ago)
Author:
kjm18
Message:

BrowseFields filteroption renamed IndexField - uses indexfieldmap in build.cfg
Level info also set in collect.cfg.
termvariants now present.

Location:
trunk/gsdl/src/colservr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/colservr/mgppqueryfilter.cpp

    r1788 r1835  
    3838mgppqueryfilterclass::mgppqueryfilterclass ()
    3939  : queryfilterclass() {
    40  
    41  FilterOption_t filtopt;
     40
     41 
     42  FilterOption_t filtopt;
     43 
    4244  // -- onePerTerm  Level          enumerated
     45  // Document, Section, Paragraph
    4346  filtopt.clear();
    4447  filtopt.name = "Level";
     
    4649  filtopt.repeatable = FilterOption_t::onePerTerm;
    4750  filtopt.validValues.push_back("Document");
    48   filtopt.validValues.push_back("Section");
    49   filtopt.validValues.push_back("Paragraph");
    5051  filtopt.defaultValue = "Document";
    5152  filterOptions["Level"] = filtopt;
    5253
    53   // --  BrowseFields, enumerated, used to list available fields
     54  // --  IndexField, enumerated, used to list available fields
     55  // ZZ used to represent "AllFields"
    5456  filtopt.clear();
    55   filtopt.name = "BrowseFields";
     57  filtopt.name = "IndexField";
    5658  filtopt.type = FilterOption_t::enumeratedt;
    5759  filtopt.repeatable = FilterOption_t::onePerTerm;
    58   filtopt.validValues.push_back("AllFields");
    59   filtopt.defaultValue = "AllFields";
    60   filterOptions["BrowseFields"] = filtopt;
     60  filtopt.validValues.push_back("ZZ");
     61  filtopt.defaultValue = "ZZ";
     62  filterOptions["IndexField"] = filtopt;
    6163
    6264}
     
    7476  queryfilterclass::configure(key, cfgline);
    7577
    76   if (key == "indexfields") {
     78  if (key == "indexfieldmap") {
     79    indexfieldmap.importmap (cfgline);
     80   
     81    // update the list of indexes in the filter information
     82    text_tarray options;
     83    indexfieldmap.gettoarray (options);
     84
     85    text_tarray::const_iterator here = options.begin();
     86    text_tarray::const_iterator end = options.end();
     87   
     88    while (here !=end) {
     89      if (!(*here).empty())
     90    filterOptions["IndexField"].validValues.push_back(*here);
     91      here++;
     92    }
     93  }
     94
     95  if (key == "levels") {
    7796    text_tarray::const_iterator here = cfgline.begin();
    7897    text_tarray::const_iterator end = cfgline.end();
    79    
    80     while (here !=end) {
    81      
    82       filterOptions["BrowseFields"].validValues.push_back(*here);
     98
     99    while (here != end) {
     100      if (!(*here).empty())
     101    filterOptions["Level"].validValues.push_back(*here);
    83102      here++;
    84103    }
     
    185204  // assemble the term results
    186205  if (need_term_info(request.filterResultOptions)) {
    187     // note: the terms have already been sorted and uniqued
     206    // note: the terms have already been sorted and uniqued - ?? have they??
    188207
    189208    TermInfo_t terminfo;
     
    199218
    200219      // this bit gets the matchTerms ie the equivalent (stem/casefold) terms
    201       // there is no info in termvariants at this stage - need to modify mgpp
    202       // to get this info
    203       /*
    204220      if (terms_first) {
    205221    text_tset::iterator termvariants_here = queryresults.termvariants.begin();
     
    211227      }
    212228      terms_first = false;
    213       */
    214       // for now, just put the original terms in
    215       terminfo.matchTerms.push_back(terminfo.term);
    216 
     229     
    217230      response.termInfo.push_back (terminfo);
    218231
  • trunk/gsdl/src/colservr/mgppqueryfilter.h

    r1324 r1835  
    3535protected:
    3636
     37  stringmap indexfieldmap;
    3738  bool full_text_browse (int filterRequestOptions);
    3839
Note: See TracChangeset for help on using the changeset viewer.