source: main/trunk/greenstone2/common-src/indexers/mgpp/jni/MGPPSearchWrapperImpl.h@ 29409

Last change on this file since 29409 was 29409, checked in by kjdon, 9 years ago

adding a reset method to MGPPSearchWrapper. When we rebuild a collection, we are unloading then reloading the index data, however the default settings (stem method etc) were not being reset. This led to a problem: If a collection was built with accent folding on, and a query wsa done with accent folding on, then this was stored in defaultStemMethod. If the collection was then built without accent folding on, the accent folding setting wouldn't be unset and forever after, the stemMethod would be wrong and therefore no stem/casefold could be done. Now we can call reset after unloading the indexdata to get all the settings back to defaults.

File size: 1.2 KB
Line 
1/*
2 * MGPPSearchWrapperImpl.h
3 * Copyright (C) 2007 New Zealand Digital Library, http://www.nzdl.org
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20#include "MGQuery.h"
21
22// the global stuff we need to do a query
23class MGPPSearchData {
24 public:
25 IndexData * indexData;
26 QueryInfo * queryInfo;
27 int defaultStemMethod;
28 int defaultBoolCombine;
29 int maxNumeric;
30 UCArray level; // the return level
31
32 MGPPSearchData();
33 ~MGPPSearchData();
34
35 void resetDefaults(); // reset the defaults
36};
Note: See TracBrowser for help on using the repository browser.