Changeset 1835
- Timestamp:
- 2001-01-15T12:51:24+13:00 (23 years ago)
- Location:
- trunk/gsdl/src/colservr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/mgppqueryfilter.cpp
r1788 r1835 38 38 mgppqueryfilterclass::mgppqueryfilterclass () 39 39 : queryfilterclass() { 40 41 FilterOption_t filtopt; 40 41 42 FilterOption_t filtopt; 43 42 44 // -- onePerTerm Level enumerated 45 // Document, Section, Paragraph 43 46 filtopt.clear(); 44 47 filtopt.name = "Level"; … … 46 49 filtopt.repeatable = FilterOption_t::onePerTerm; 47 50 filtopt.validValues.push_back("Document"); 48 filtopt.validValues.push_back("Section");49 filtopt.validValues.push_back("Paragraph");50 51 filtopt.defaultValue = "Document"; 51 52 filterOptions["Level"] = filtopt; 52 53 53 // -- BrowseFields, enumerated, used to list available fields 54 // -- IndexField, enumerated, used to list available fields 55 // ZZ used to represent "AllFields" 54 56 filtopt.clear(); 55 filtopt.name = " BrowseFields";57 filtopt.name = "IndexField"; 56 58 filtopt.type = FilterOption_t::enumeratedt; 57 59 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; 61 63 62 64 } … … 74 76 queryfilterclass::configure(key, cfgline); 75 77 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") { 77 96 text_tarray::const_iterator here = cfgline.begin(); 78 97 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); 83 102 here++; 84 103 } … … 185 204 // assemble the term results 186 205 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?? 188 207 189 208 TermInfo_t terminfo; … … 199 218 200 219 // this bit gets the matchTerms ie the equivalent (stem/casefold) terms 201 // there is no info in termvariants at this stage - need to modify mgpp202 // to get this info203 /*204 220 if (terms_first) { 205 221 text_tset::iterator termvariants_here = queryresults.termvariants.begin(); … … 211 227 } 212 228 terms_first = false; 213 */ 214 // for now, just put the original terms in 215 terminfo.matchTerms.push_back(terminfo.term); 216 229 217 230 response.termInfo.push_back (terminfo); 218 231 -
trunk/gsdl/src/colservr/mgppqueryfilter.h
r1324 r1835 35 35 protected: 36 36 37 stringmap indexfieldmap; 37 38 bool full_text_browse (int filterRequestOptions); 38 39
Note:
See TracChangeset
for help on using the changeset viewer.