source: main/trunk/greenstone2/runtime-src/src/colservr/fieldedqueryfilter.h@ 27064

Last change on this file since 27064 was 27064, checked in by kjdon, 11 years ago

adding reverse sort/sort order in for lucene search results sorting. reorganising code to avoid duplication, added fieldedqueryfilter in the chain of inheritance

File size: 2.2 KB
Line 
1/**********************************************************************
2 *
3 * queryfilter.h -- abstract base class for fielded queryfilters
4 * mgppqueryfilter and lucenequeryfilter
5 * implement this
6 * Copyright (C) 2013 The New Zealand Digital Library Project
7 *
8 * A component of the Greenstone digital library software
9 * from the New Zealand Digital Library Project at the
10 * University of Waikato, New Zealand.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 *
26 *********************************************************************/
27
28
29#ifndef FIELDEDQUERYFILTER_H
30#define FIELDEDQUERYFILTER_H
31
32
33#include "queryfilter.h"
34
35
36class fieldedqueryfilterclass : public queryfilterclass {
37protected:
38
39 stringmap indexfieldmap;
40 stringmap levelmap;
41
42 bool full_text_browse (int filterRequestOptions);
43
44 // do query that might involve multiple sub queries
45 // textsearchptr and db_ptr are assumed to be valid
46 virtual void do_multi_query (const FilterRequest_t &request,
47 const vector<queryparamclass> &query_params,
48 queryresultsclass &multiresults,
49 comerror_t &err, ostream &logout)=0;
50
51public:
52 fieldedqueryfilterclass ();
53 virtual ~fieldedqueryfilterclass ();
54
55 void configure (const text_t &key, const text_tarray &cfgline);
56 bool init (ostream &logout);
57
58 void filter (const FilterRequest_t &request,
59 FilterResponse_t &response,
60 comerror_t &err, ostream &logout)=0;
61
62 void browsefilter(const FilterRequest_t &request,
63 FilterResponse_t &response,
64 comerror_t &err, ostream &logout);
65
66
67};
68
69
70#endif
71
Note: See TracBrowser for help on using the repository browser.