Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Typedefs | Functions
groonga_suggest_learner.c File Reference
#include "zmq_compatible.h"
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <msgpack.h>
#include <pthread.h>
#include <groonga.h>
#include <inttypes.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
#include "util.h"
#include <evhttp.h>
Include dependency graph for groonga_suggest_learner.c:

Go to the source code of this file.

Data Structures

struct  send_thd_data
struct  _suggest_log_file

Macros

#define DEFAULT_RECV_ENDPOINT   "tcp://*:1234"
#define DEFAULT_SEND_ENDPOINT   "tcp://*:1235"
#define SEND_WAIT   1000 /* 0.001sec */
#define CONST_STR_LEN(x)   x, x ? sizeof(x) - 1 : 0
#define PACK_KEY_FROM_ID(id)
#define PACK_MAP_ITEM(col_name)
#define MAX_LOG_LENGTH   0x2000
#define PATH_SEPARATOR   '/'

Typedefs

typedef struct _suggest_log_file suggest_log_file

Functions

void load_to_multi_targets (grn_ctx *ctx, grn_obj *buf, const char *query, uint32_t query_len, const char *client_id, uint32_t client_id_len, const char *learn_target_names, uint32_t learn_target_names_len, uint64_t millisec, int submit)
int main (int argc, char **argv)

Macro Definition Documentation

#define CONST_STR_LEN (   x)    x, x ? sizeof(x) - 1 : 0

Definition at line 37 of file groonga_suggest_learner.c.

#define DEFAULT_RECV_ENDPOINT   "tcp://*:1234"

Definition at line 33 of file groonga_suggest_learner.c.

#define DEFAULT_SEND_ENDPOINT   "tcp://*:1235"

Definition at line 34 of file groonga_suggest_learner.c.

#define MAX_LOG_LENGTH   0x2000

Definition at line 526 of file groonga_suggest_learner.c.

#define PACK_KEY_FROM_ID (   id)
Value:
do { \
int _k_len; \
char _k_buf[GRN_TABLE_MAX_KEY_SIZE]; \
_k_len = grn_table_get_key(ctx, ref_table, (id), _k_buf, GRN_TABLE_MAX_KEY_SIZE); \
msgpack_pack_raw(&pk, _k_len); \
msgpack_pack_raw_body(&pk, _k_buf, _k_len); \
} while (0)

Definition at line 128 of file groonga_suggest_learner.c.

#define PACK_MAP_ITEM (   col_name)

Definition at line 136 of file groonga_suggest_learner.c.

#define PATH_SEPARATOR   '/'

Definition at line 595 of file groonga_suggest_learner.c.

#define SEND_WAIT   1000 /* 0.001sec */

Definition at line 35 of file groonga_suggest_learner.c.

Typedef Documentation

Definition at line 495 of file groonga_suggest_learner.c.

Function Documentation

void load_to_multi_targets ( grn_ctx ctx,
grn_obj buf,
const char *  query,
uint32_t  query_len,
const char *  client_id,
uint32_t  client_id_len,
const char *  learn_target_names,
uint32_t  learn_target_names_len,
uint64_t  millisec,
int  submit 
)

Definition at line 92 of file groonga_suggest_learner.c.

int main ( int  argc,
char **  argv 
)

Definition at line 689 of file groonga_suggest_learner.c.

Here is the call graph for this function: