IDZEBRA  2.1.2
Data Structures | Functions | Variables
ranksimilarity.c File Reference
#include <stdio.h>
#include <assert.h>
#include <limits.h>
#include "index.h"
#include "rank.h"

Go to the source code of this file.

Data Structures

struct  ranksimilarity_class_info
 
struct  ranksimilarity_term_info
 
struct  ranksimilarity_set_info
 

Functions

static void ranksimilar_rec_reset (struct ranksimilarity_set_info *si)
 
static void * create (ZebraHandle zh)
 
static void destroy (struct zebra_register *reg, void *class_handle)
 
static void * begin (struct zebra_register *reg, void *class_handle, RSET rset, NMEM nmem, TERMID *terms, int numterms)
 
static void end (struct zebra_register *reg, void *set_handle)
 
static void add (void *set_handle, int seqno, TERMID term)
 
static int calc (void *set_handle, zint sysno, zint staticrank, int *stop_flag)
 

Variables

static int log_level = 0
 
static int log_initialized = 0
 
static struct rank_control rank_control
 
struct rank_controlrank_similarity_class = &rank_control
 

Function Documentation

static void add ( void *  set_handle,
int  seqno,
TERMID  term 
)
static

add: Called for each word occurence in a result set. This routine should be as fast as possible. This routine should "incrementally" update the score.

Definition at line 281 of file ranksimilarity.c.

References ranksimilarity_term_info::freq_term_docfield, ranksimilarity_set_info::last_pos, and rset_term::rankpriv.

static void* begin ( struct zebra_register reg,
void *  class_handle,
RSET  rset,
NMEM  nmem,
TERMID terms,
int  numterms 
)
static
static int calc ( void *  set_handle,
zint  sysno,
zint  staticrank,
int *  stop_flag 
)
static
static void* create ( ZebraHandle  zh)
static

Definition at line 112 of file ranksimilarity.c.

References log_initialized, and log_level.

static void destroy ( struct zebra_register reg,
void *  class_handle 
)
static

Definition at line 131 of file ranksimilarity.c.

References log_level.

static void end ( struct zebra_register reg,
void *  set_handle 
)
static

Definition at line 269 of file ranksimilarity.c.

References log_level.

static void ranksimilar_rec_reset ( struct ranksimilarity_set_info si)
static

Variable Documentation

int log_initialized = 0
static

Definition at line 37 of file ranksimilarity.c.

Referenced by create().

int log_level = 0
static

Definition at line 36 of file ranksimilarity.c.

Referenced by begin(), calc(), create(), destroy(), and end().

struct rank_control rank_control
static
Initial value:
= {
"rank-similarity",
end,
add,
}
static void * begin(struct zebra_register *reg, void *class_handle, RSET rset, NMEM nmem, TERMID *terms, int numterms)
static int calc(void *set_handle, zint sysno, zint staticrank, int *stop_flag)
static void destroy(struct zebra_register *reg, void *class_handle)
static void add(void *set_handle, int seqno, TERMID term)
static void * create(ZebraHandle zh)
static void end(struct zebra_register *reg, void *set_handle)

Definition at line 401 of file ranksimilarity.c.

struct rank_control* rank_similarity_class = &rank_control

Definition at line 411 of file ranksimilarity.c.

Referenced by zebra_register_open().