/* This file is part of the Zebra server.
- Copyright (C) 1995-2008 Index Data
+ Copyright (C) Index Data
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdio.h>
#include <assert.h>
#include <limits.h>
};
/*
- * create: Creates/Initialises this rank handler. This routine is
+ * create: Creates/Initialises this rank handler. This routine is
* called exactly once. The routine returns the class_handle.
*/
static void *create (ZebraHandle zh)
* each result set. The returned handle is a "set handle" and
* will be used in each of the handlers below.
*/
-static void *begin (struct zebra_register *reg,
+static void *begin (struct zebra_register *reg,
void *class_handle, RSET rset, NMEM nmem,
TERMID *terms, int numterms)
{
- struct rank_set_info *si =
+ struct rank_set_info *si =
(struct rank_set_info *) nmem_malloc (nmem, sizeof(*si));
int i;
{
struct ord_list *ol = terms[i]->ol;
- yaz_log(log_level, "i=%d flags=%s '%s'", i,
+ yaz_log(log_level, "i=%d flags=%s '%s'", i,
terms[i]->flags, terms[i]->name );
for (; ol; ol = ol->next)
yaz_log(log_level, " ord=%d index_type=%s db=%s set=%d use=%d",
ol->ord, index_type, db, set, use);
}
- if (!strncmp (terms[i]->flags, "rank,", 5))
+ if (!strncmp (terms[i]->flags, "rank,", 5))
(si->no_rank_entries)++;
}
return si;
}
/*
- * calc: Called for each document in a result. This handler should
+ * calc: Called for each document in a result. This handler should
* produce a score based on previous call(s) to the add handler. The
* score should be between 0 and 1000. If score cannot be obtained
* -1 should be returned.
calc,
add,
};
-
+
struct rank_control *rank_static_class = &rank_control;
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab