Changeset 4752
- Timestamp:
- 2003-06-23T14:09:43+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/mgppqueryfilter.cpp
r4218 r4752 53 53 54 54 // -- IndexField, enumerated, used to list available fields 55 // ZZ used to represent "AllFields"56 55 filtopt.clear(); 57 56 filtopt.name = "IndexField"; 58 57 filtopt.type = FilterOption_t::enumeratedt; 59 58 filtopt.repeatable = FilterOption_t::onePerTerm; 60 filtopt.validValues.push_back("ZZ"); 61 filtopt.defaultValue = "ZZ"; 59 filtopt.defaultValue = ""; 62 60 filterOptions["IndexField"] = filtopt; 63 61 … … 85 83 text_tarray::const_iterator here = options.begin(); 86 84 text_tarray::const_iterator end = options.end(); 87 85 bool start = true; 88 86 while (here !=end) { 89 if (!(*here).empty()) 87 if (!(*here).empty()) { 90 88 filterOptions["IndexField"].validValues.push_back(*here); 89 if (start) { 90 filterOptions["IndexField"].defaultValue = *here; 91 start = false; 92 } 93 } 91 94 here++; 92 95 } … … 94 97 95 98 if (key == "levels") { 99 // if levels has been specified, we remove the default Document from valid values - currently, it is the only one - not yet 100 //filterOptions["Level"].validValues.erase(0); 96 101 text_tarray::const_iterator here = cfgline.begin(); 97 102 text_tarray::const_iterator end = cfgline.end(); 98 103 99 104 while (here != end) { 100 105 if (!(*here).empty()) { 101 filterOptions["Level"].validValues.push_back(*here); 102 if ((*here) == "Section") { 106 if ((*here) == "section" || (*here) == "Section") { 107 filterOptions["Level"].validValues.push_back("Section"); 108 filterOptions["Level"].defaultValue = "Section"; 103 109 text_t sect = "Section"; 104 110 ((mgppsearchclass *)mgsearchptr)->set_gdbm_level(sect); 105 } 106 111 } else if ((*here) == "document" || (*here) == "Document") { 112 //filterOptions["Level"].validValues.push_back("Document"); 113 } else if ((*here) == "paragraph" || (*here) == "Paragraph") { 114 filterOptions["Level"].validValues.push_back("Paragraph"); 115 } 107 116 } 108 117 here++; 109 118 } 119 // just check to make sure that there have been some levels specified 120 // if (filterOptions["Level"].validValues.empty()) { 121 // add back in document 122 // filterOptions["Level"].validValues.push_back("Document"); 123 // } 110 124 111 125 }
Note:
See TracChangeset
for help on using the changeset viewer.