Last change
on this file since 4 was 4, checked in by sjboddie, 25 years ago |
Initial revision
|
-
Property svn:executable
set to
*
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.4 KB
|
Line | |
---|
1 | #ifndef MGSEARCH_H
|
---|
2 | #define MGSEARCH_H
|
---|
3 |
|
---|
4 |
|
---|
5 | #include "text_t.h"
|
---|
6 | #include "querycache.h"
|
---|
7 |
|
---|
8 | #define RESULTCACHESIZE 10
|
---|
9 | #define MAXNUMDOCS 500
|
---|
10 | #define MAXNUMTERMS 100
|
---|
11 |
|
---|
12 | class mgsearchclass
|
---|
13 | {
|
---|
14 | public:
|
---|
15 | mgsearchclass ();
|
---|
16 | virtual ~mgsearchclass ();
|
---|
17 |
|
---|
18 | // the index directory must be set before any searching
|
---|
19 | // is done
|
---|
20 | void setindexhome (const text_t &theindexhome);
|
---|
21 |
|
---|
22 | // the search results are returned in queryresults
|
---|
23 | // search returns 'true' if it was able to do a search
|
---|
24 | bool search(const queryparamclass &queryparams,
|
---|
25 | queryresultsclass &queryresults);
|
---|
26 |
|
---|
27 | // the document text for 'docnum' is placed in 'output'
|
---|
28 | // docTargetDocument returns 'true' if it was able to
|
---|
29 | // try to get a document
|
---|
30 | // collection is needed to see if an index from the
|
---|
31 | // collection is loaded. If no index has been loaded
|
---|
32 | // defaultindex is needed to load one
|
---|
33 | bool docTargetDocument(const text_t &defaultindex,
|
---|
34 | const text_t &collection,
|
---|
35 | int docnum,
|
---|
36 | text_t &output);
|
---|
37 |
|
---|
38 | protected:
|
---|
39 | querycache *cache;
|
---|
40 | text_t indexhome; // top level directory for indexes
|
---|
41 |
|
---|
42 | void setsearchmode (const queryparamclass &queryparams);
|
---|
43 | void submitquery (const queryparamclass &queryparams);
|
---|
44 | void getresults (queryresultsclass &queryresults);
|
---|
45 |
|
---|
46 | virtual void extractquoted (text_t &ttquerystring, text_t &ttquotedquery);
|
---|
47 | virtual void filterquery (text_t &ttquerystring);
|
---|
48 | };
|
---|
49 |
|
---|
50 | #endif
|
---|
51 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.