home *** CD-ROM | disk | FTP | other *** search
/ ftp.uv.es / 2014.11.ftp.uv.es.tar / ftp.uv.es / pub / unix / freeWAIS-0.202.tar.gz / freeWAIS-0.202.tar / freeWAIS-0.202 / ir / irsearch.h < prev    next >
C/C++ Source or Header  |  1993-10-05  |  2KB  |  78 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. /* Copyright (c) CNIDR (see ../COPYRIGHT) */
  8.  
  9.  
  10. /* header file for irsearch.c */
  11.  
  12. #ifndef _H_search_
  13. #define _H_search_
  14.  
  15. #include "cdialect.h"
  16. #include "irfiles.h"
  17. #include "cutil.h"
  18. #include "futil.h"
  19. #include "irhash.h"
  20. #include "zprot.h"
  21. #include "wprot.h"
  22.  
  23. /* the default database to use if none is specified */
  24. #define    INFO_DATABASE_NAME    "INFO"
  25. #define MAX_NORMAL_SCORE 1000
  26.  
  27.  
  28. extern char *server_name;
  29. extern long tcp_port;
  30.  
  31. typedef struct hit {
  32.     double     weight;
  33.     long     document_id;
  34.     long    start_character;
  35.     long     end_character;
  36.     char     filename[MAX_FILE_NAME_LEN + 1];
  37.     char     headline[MAX_HEADLINE_LEN + 1];
  38.     char     type[MAX_TYPE_LEN + 1];
  39.     char    date[ANSI_DATE_LENGTH + 1];
  40.     long    number_of_lines;
  41.     long     document_length;
  42.     long     best_character;  /* this is the offset into the 
  43.                     document of the character at    
  44.                     the start of the best section */
  45.     long     best_line;  /* similar to best_character but for lines */
  46.     database *db;
  47. } hit;    
  48.  
  49. typedef struct search {
  50.     database*        db;    
  51.     double*            document_score_array;
  52. #ifdef BOOLEANS
  53.     double*        prior_score_array;    /* dgg, 12/91 GS TLG */
  54. #endif
  55.     unsigned long        num_best_hits;
  56.     hit*            best_hits;
  57. } search;
  58.  
  59. /* exported functions */
  60. #ifdef __cplusplus
  61. /* declare these as C style functions */
  62. extern "C"
  63.     {
  64. #endif /* def __cplusplus */
  65.  
  66. boolean run_search 
  67.   _AP((SearchAPDU* aSearch,
  68.        WAISDocumentHeader** headers,
  69.        diagnosticRecord*** diags,char* index_directory, 
  70.        char** seed_words_used,
  71.        long waisProtocolVersion,long* headerNum));
  72.  
  73. #ifdef __cplusplus
  74.     }
  75. #endif /* def __cplusplus */
  76.  
  77. #endif
  78.