home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / Programming / Source / WAIS / ir / irsearch.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-02  |  1.3 KB  |  64 lines

  1. /* WIDE AREA INFORMATION SERVER SOFTWARE    
  2.    No guarantees or restrictions.  See the readme file for the full standard 
  3.    disclaimer.
  4.    3.26.90    Brewster Kahle, brewster@think.com
  5. */
  6.  
  7. /* header file for irsearch.c */
  8.  
  9. #ifndef _H_search_
  10. #define _H_search_
  11.  
  12. #include "cdialect.h"
  13. #include "irfiles.h"
  14. #include "cutil.h"
  15. #include "futil.h"
  16. #include "irhash.h"
  17. #include "zprot.h"
  18. #include "wprot.h"
  19.  
  20. /* the default database to use if none is specified */
  21. #define    INFO_DATABASE_NAME    "INFO"
  22. #define MAX_NORMAL_SCORE 1000
  23.  
  24.  
  25. typedef struct hit {
  26.     long     weight;
  27.     long     document_id;
  28.     long    start_character;
  29.     long     end_character;
  30.     char     filename[MAX_FILE_NAME_LEN + 1];
  31.     char     headline[MAX_HEADLINE_LEN + 1];
  32.     char     type[MAX_TYPE_LEN + 1];
  33.     char    date[ANSI_DATE_LENGTH + 1];
  34.     long    number_of_lines;
  35.     long     document_length;
  36. } hit;    
  37.  
  38. typedef struct search {
  39.     database*        db;    
  40.     unsigned char*        document_score_array;
  41.     unsigned long        num_best_hits;
  42.     hit*            best_hits;
  43. } search;
  44.  
  45. /* exported functions */
  46. #ifdef __cplusplus
  47. /* declare these as C style functions */
  48. extern "C"
  49.     {
  50. #endif /* def __cplusplus */
  51.  
  52. boolean run_search 
  53.   _AP((SearchAPDU* aSearch,
  54.        WAISDocumentHeader** headers,
  55.        diagnosticRecord*** diags,char* index_directory, 
  56.        char** seed_words_used,
  57.        long waisProtocolVersion,long* headerNum));
  58.  
  59. #ifdef __cplusplus
  60.     }
  61. #endif /* def __cplusplus */
  62.  
  63. #endif
  64.