Changeset 319 for trunk/gsdl/src/colservr/mgq.c
- Timestamp:
- 1999-06-30T16:04:14+12:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/mgq.c
r308 r319 12 12 /* 13 13 $Log$ 14 Revision 1.5 1999/06/30 04:04:11 rjmcnab 15 made stemming functions available from mgsearch and made the stems 16 for the query terms available in queryinfo 17 14 18 Revision 1.4 1999/06/28 08:56:29 rjmcnab 15 19 A bit of hacking to remove the restriction that the index to get … … 60 64 #include "term_lists.h" 61 65 #include "local_strings.h" 66 67 #include "words.h" 68 #include "stemmer.h" 62 69 63 70 #ifdef __cplusplus … … 561 568 562 569 570 /* use mgq_getmaxstemlen to determine the length of the word stems to pass */ 571 /* to mgq_stemword */ 572 int mgq_getmaxstemlen () { 573 return MAXSTEMLEN; 574 } 575 576 /* note: the stemming method and the stemmer come from the last query */ 577 /* "word" should be at least maxstemlen+1 long and it is a string that */ 578 /* starts with the string length */ 579 void mgq_stemword (unsigned char *word) { 580 int stem_method = 0; 581 query_data *qd = NULL; 582 583 if (cur_cachenum == -1) return; 584 qd = dbcache[cur_cachenum].qd; 585 if (qd == NULL || word == NULL) return; 586 587 if (qd->sd->sdh.indexed) { 588 stem_method = BooleanEnv(GetEnv("casefold"),0) | (BooleanEnv(GetEnv("stem"),0) << 1); 589 } else { 590 stem_method = qd->sd->sdh.stem_method; 591 } 592 593 stemmer (stem_method, qd->sd->sdh.stemmer_num, word); 594 } 595 596 597 563 598 int is_dbcache_full (void) { 564 599 init_dbcache ();
Note:
See TracChangeset
for help on using the changeset viewer.