Changeset 4193
- Timestamp:
- 2003-04-18T14:25:00+12:00 (21 years ago)
- Location:
- trunk/gsdl/src/colservr
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/mgqueryfilter.cpp
r3203 r4193 85 85 ///////////////////////////////// 86 86 87 88 void mgqueryfilterclass::configure (const text_t &key, const text_tarray &cfgline) { 89 queryfilterclass::configure (key, cfgline); 90 91 if (key == "maxnumeric") { 92 maxnumeric = cfgline[0].getint(); 93 } 94 } 95 87 96 // loads up phrases data structure with any phrases (that's the quoted bits) 88 97 // occuring in the querystring … … 272 281 273 282 num_phrases = 0; 274 283 maxnumeric = 4; 275 284 } 276 285 … … 446 455 while (query_here != query_end) { 447 456 457 // set maxnumeric 458 (*query_here).maxnumeric = maxnumeric; 459 448 460 // if we're doing a phrase search we want to maximise hits by making it 449 461 // a boolean search on the index with the finest granularity - we'll … … 483 495 } 484 496 } 485 486 #ifdef GSDL_BBC_COLLECTION487 // This is a special hack for the BBC collection's ProgNumber index488 489 // if we're searching the zzAB/zzAN index we want to remove all490 // non-alphanumeric characters from the query string491 text_t longindex; text_tarray splitindex;492 indexmap.to2from ((*query_here).index, longindex);493 splitchar (longindex.begin(), longindex.end(), ':', splitindex);494 text_t &indextype = splitindex[1];495 if (indextype == "zzabn") {496 text_t new_querystring;497 text_t::const_iterator here = (*query_here).querystring.begin();498 text_t::const_iterator end = (*query_here).querystring.end();499 while (here != end) {500 if ((*here >= 'a' && *here <= 'z') || (*here >= 'A' && *here <= 'Z') ||501 (*here >= '0' && *here <= '9')) {502 new_querystring.push_back (*here);503 }504 here ++;505 }506 (*query_here).querystring = new_querystring;507 }508 #endif509 497 query_here ++; 510 498 } -
trunk/gsdl/src/colservr/mgqueryfilter.h
r1674 r4193 51 51 int num_phrases; 52 52 53 int maxnumeric; 54 53 55 void get_phrase_terms (const text_t &querystring, 54 56 const termfreqclassarray &orgterms, … … 79 81 virtual ~mgqueryfilterclass (); 80 82 83 virtual void configure (const text_t &key, const text_tarray &cfgline); 84 81 85 void filter (const FilterRequest_t &request, 82 86 FilterResponse_t &response, -
trunk/gsdl/src/colservr/mgsearch.cpp
r2545 r4193 384 384 mgq_ask(maxdocstr); 385 385 } 386 387 char maxnumericstr[32]; 388 sprintf(maxnumericstr, ".set maxnumeric %i", queryparams.maxnumeric); 389 mgq_ask(maxnumericstr); 390 386 391 } 387 392 -
trunk/gsdl/src/colservr/queryinfo.cpp
r1319 r4193 46 46 stemming = 0; 47 47 maxdocs = -1; // all 48 maxnumeric = 4; // must default to the same value as mg_passes 48 49 } 49 50 … … 62 63 stemming = q.stemming; 63 64 maxdocs = q.maxdocs; 65 maxnumeric = q.maxnumeric; 64 66 65 67 return *this; … … 79 81 (x.casefolding == y.casefolding) && 80 82 (x.stemming == y.stemming) && 81 (x.maxdocs == y.maxdocs)); 83 (x.maxdocs == y.maxdocs) && 84 (x.maxnumeric == y.maxnumeric)); 82 85 } 83 86 … … 103 106 outs << " stemming = \"" << q.stemming << "\"\n"; 104 107 outs << " maxdocs = \"" << q.maxdocs << "\"\n"; 108 outs << " maxnumeric = \"" << q.maxnumeric << "\"\n"; 105 109 outs << "\n"; 106 110 -
trunk/gsdl/src/colservr/queryinfo.h
r1319 r4193 65 65 int stemming; 66 66 int maxdocs; 67 int maxnumeric; 67 68 68 69 queryparamclass ();
Note:
See TracChangeset
for help on using the changeset viewer.