ftp.nice.ch/pub/next/connectivity/infosystems/WAIStation.1.9.6.N.b.tar.gz#/WAIS/ir/irsearch.h

This is irsearch.h in view mode; [Download] [Up]

/* WIDE AREA INFORMATION SERVER SOFTWARE	
   No guarantees or restrictions.  See the readme file for the full standard 
   disclaimer.
   3.26.90	Brewster Kahle, brewster@think.com
*/

/* header file for irsearch.c */

#ifndef _H_search_
#define _H_search_

#include "cdialect.h"
#include "irfiles.h"
#include "cutil.h"
#include "futil.h"
#include "irhash.h"
#include "zprot.h"
#include "wprot.h"

/* the default database to use if none is specified */
#define	INFO_DATABASE_NAME	"INFO"
#define MAX_NORMAL_SCORE 1000


extern char *server_name;
extern long tcp_port;

typedef struct hit {
	long 	weight;
	long 	document_id;
	long	start_character;
	long 	end_character;
	char 	filename[MAX_FILE_NAME_LEN + 1];
	char 	headline[MAX_HEADLINE_LEN + 1];
	char 	type[MAX_TYPE_LEN + 1];
	char	date[ANSI_DATE_LENGTH + 1];
	long	number_of_lines;
	long 	document_length;
	long 	best_character;  /* this is the offset into the 
				    document of the character at	
				    the start of the best section */
	long 	best_line;  /* similar to best_character but for lines */
	database *db;
} hit;	

typedef struct search {
	database*		db;	
	double*			document_score_array;
	unsigned long		num_best_hits;
	hit*			best_hits;
} search;

/* exported functions */
#ifdef __cplusplus
/* declare these as C style functions */
extern "C"
	{
#endif /* def __cplusplus */

boolean run_search 
  _AP((SearchAPDU* aSearch,
       WAISDocumentHeader** headers,
       diagnosticRecord*** diags,char* index_directory, 
       char** seed_words_used,
       long waisProtocolVersion,long* headerNum));

#ifdef __cplusplus
	}
#endif /* def __cplusplus */

#endif

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.