Changeset 1324 for trunk/gsdl/src/colservr/queryfilter.h
- Timestamp:
- 2000-08-02T12:58:29+12:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/queryfilter.h
r1285 r1324 1 1 /********************************************************************** 2 2 * 3 * queryfilter.h -- 3 * queryfilter.h -- abstract base class for queryfilters 4 * mgqueryfilter and mgppqueryfilter implement this 4 5 * Copyright (C) 1999 The New Zealand Digital Library Project 5 6 * … … 35 36 #include "infodbclass.h" 36 37 #include "maptools.h" 37 #include " mgsearch.h"38 #include "search.h" 38 39 #include "queryinfo.h" 39 40 41 // resultsorderer_t is used to sort the query results42 struct resultsorderer_t {43 bool compare_phrase_match;44 bool compare_terms_match;45 bool compare_doc_weight;46 docresultmap *docset;47 48 resultsorderer_t();49 void clear();50 bool operator()(const int &t1, const int &t2) const;51 };52 53 40 54 41 … … 63 50 gdbmclass *gdbmptr; 64 51 65 mgsearchclass *mgsearchptr;52 searchclass *mgsearchptr; 66 53 67 int num_phrases; 68 69 void get_phrase_terms (const text_t &querystring, 70 const termfreqclassarray &orgterms, 71 vector<termfreqclassarray> &phrases); 72 73 // do aditional query processing 74 virtual void post_process (const queryparamclass &queryparams, 75 queryresultsclass &queryresults); 76 77 // get the query parameters 54 // get the query parameters 78 55 void parse_query_params (const FilterRequest_t &request, 79 56 vector<queryparamclass> &query_params, … … 83 60 // do query that might involve multiple sub queries 84 61 // mgsearchptr and gdbmptr are assumed to be valid 85 v oid do_multi_query (const FilterRequest_t &request,62 virtual void do_multi_query (const FilterRequest_t &request, 86 63 const vector<queryparamclass> &query_params, 87 64 queryresultsclass &multiresults, 88 comerror_t &err, ostream &logout) ;65 comerror_t &err, ostream &logout)=0; 89 66 90 virtual void sort_doc_results (const FilterRequest_t &request,91 docresultsclass &docs);92 93 94 67 public: 95 68 queryfilterclass (); … … 100 73 101 74 // the mgsearchptr remains the responsability of the calling code 102 void set_mgsearchptr ( mgsearchclass *themgsearchptr) {mgsearchptr=themgsearchptr;}75 void set_mgsearchptr (searchclass *themgsearchptr) {mgsearchptr=themgsearchptr;} 103 76 104 v oid configure (const text_t &key, const text_tarray &cfgline);77 virtual void configure (const text_t &key, const text_tarray &cfgline); 105 78 bool init (ostream &logout); 79 106 80 text_t get_filter_name () {return "QueryFilter";} 107 void filter (const FilterRequest_t &request, 81 bool translate(gdbmclass *gdbmptr, int docnum, text_t &trans_OID); 82 bool need_matching_docs (int filterResultOptions); 83 bool need_term_info (int filterResultOptions); 84 85 86 virtual void filter (const FilterRequest_t &request, 108 87 FilterResponse_t &response, 109 comerror_t &err, ostream &logout); 88 comerror_t &err, ostream &logout)=0; 89 90 91 110 92 }; 111 93 112 94 113 95 #endif 96
Note:
See TracChangeset
for help on using the changeset viewer.