/[MITgcm]/mitgcm.org/devel/buildweb/pkg/swish-e/src/search.h
ViewVC logotype

Contents of /mitgcm.org/devel/buildweb/pkg/swish-e/src/search.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Fri Sep 20 19:47:29 2002 UTC (22 years, 10 months ago) by adcroft
Branch: Import, MAIN
CVS Tags: baseline, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
Importing web-site building process.

1 /*
2 ** Copyright (C) 1995, 1996, 1997, 1998 Hewlett-Packard Company
3 ** Originally by Kevin Hughes, kev@kevcom.com, 3/11/94
4 **
5 ** This program and library is free software; you can redistribute it and/or
6 ** modify it under the terms of the GNU (Library) General Public License
7 ** as published by the Free Software Foundation; either version 2
8 ** of the License, or 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 (Library) General Public License for more details.
14 **
15 ** You should have received a copy of the GNU (Library) General Public License
16 ** along with this program; if not, write to the Free Software
17 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 **-------------------------------------------------------
19 ** Added getMetaName & isMetaName
20 ** to support METADATA
21 ** G. Hill 3/18/97 ghill@library.berkeley.edu
22 */
23
24
25 #ifndef __HasSeenModule_Search
26 #define __HasSeenModule_Search 1
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 /*
33 -- module data
34 */
35
36 struct MOD_Search
37 {
38 /* start of hits */
39 int beginhits;
40 /* max. number of hits */
41 int maxhits;
42
43 /* Properties vars */
44 int numPropertiesToDisplay;
45 int currentMaxPropertiesToDisplay;
46 char **propNameToDisplay;
47
48
49 /* All Results per index file */
50 struct DB_RESULTS *db_results;
51
52 /* Hash array for merging results */
53 RESULT *resulthashlist[BIGHASHSIZE];
54
55 int bigrank;
56
57 /* Phrase delimiter char */
58 int PhraseDelimiter;
59
60 /* Number of stopwords removed from query */
61 int removed_stopwords;
62
63 MEM_ZONE *resultSearchZone;
64 };
65
66 void initModule_Search (SWISH *);
67 void freeModule_Search (SWISH *);
68 void resetModule_Search (SWISH *);
69 int configModule_Search (SWISH *, StringList *);
70
71
72 int search (SWISH *sw, char *str, int structure);
73 int search_2 (SWISH *sw, char *words, int structure);
74 RESULT *SwishNext(SWISH *);
75
76 struct swline *fixmetanames(struct swline *);
77 struct swline *fixnot1(struct swline *);
78 struct swline *fixnot2(struct swline *);
79 struct swline *expandphrase(struct swline *, char);
80
81 void printheaderbuzzwords(SWISH *sw, IndexFILE * indexf);
82
83 RESULT_LIST *parseterm(SWISH *, int, int, int, IndexFILE *, struct swline **);
84 RESULT_LIST *operate(SWISH *, RESULT_LIST *, int, char *, void *, int, int, int, IndexFILE *);
85 RESULT_LIST *getfileinfo(SWISH *, char *, IndexFILE *, int, int);
86
87 int isrule(char *);
88 int isnotrule(char *);
89 int isbooleanrule(char *);
90 int isunaryrule(char *);
91 int isMetaNameOpNext(struct swline *);
92 int getrulenum(char *);
93 int u_isnotrule(SWISH *sw, char *word);
94 int u_isrule(SWISH *sw, char *word);
95 int u_SelectDefaultRulenum(SWISH *sw, char *word);
96
97
98 RESULT_LIST *andresultlists(SWISH *, RESULT_LIST *, RESULT_LIST *, int);
99 RESULT_LIST *orresultlists(SWISH *, RESULT_LIST *, RESULT_LIST *);
100 RESULT_LIST *notresultlist(SWISH *, RESULT_LIST *, IndexFILE *);
101 RESULT_LIST *notresultlists(SWISH *, RESULT_LIST *, RESULT_LIST *);
102 RESULT_LIST *phraseresultlists(SWISH *, RESULT_LIST *, RESULT_LIST *, int);
103 void addtoresultlist(RESULT_LIST *, int, int, int, int, IndexFILE *,SWISH *);
104
105
106 RESULT_LIST *sortresultsbyfilenum(RESULT_LIST *);
107
108 void getrawindexline(FILE *);
109 int wasStemmingAppliedToIndex(FILE *);
110 int wasSoundexAppliedToIndex(FILE *);
111
112 void freeresultlist(SWISH *sw,struct DB_RESULTS *);
113 void freeresult(SWISH *,RESULT *);
114 struct swline *ignore_words_in_query(SWISH *,IndexFILE *, struct swline *,unsigned char);
115 struct swline *stem_words_in_query(SWISH *,IndexFILE *, struct swline *);
116 struct swline *soundex_words_in_query(SWISH *,IndexFILE *, struct swline *);
117 struct swline *translatechars_words_in_query(SWISH *sw,IndexFILE *indexf,struct swline *searchwordlist);
118 struct swline *parse_search_string(SWISH *sw, char *words,INDEXDATAHEADER header);
119
120 RESULT_LIST *mergeresulthashlist (SWISH *sw, RESULT_LIST *r);
121
122 #ifdef __cplusplus
123 }
124 #endif /* __cplusplus */
125
126 #endif /* __HasSeenModule_Search */
127

  ViewVC Help
Powered by ViewVC 1.1.22