7.1.9. groonga-suggest-learner — Groonga v16.0.5ドキュメント

本文へスキップ
`Ctrl`+`K`

# 7.1.9. groonga-suggest-learner

## 7.1.9.1. 概要

groonga-suggest-learner is a program to learn suggest result from data which derived from groonga-suggest-httpd. Usually, it is used with groonga-suggest-httpd, but It is allowed to launch standalone. In such a case, groonga-suggest-learner loads data from log directory.

## 7.1.9.2. 書式

    groonga-suggest-learner [options] database_path

## 7.1.9.3. 使い方

groonga-suggest-leaner supports the two way of learning data. One is learning data from groonga-suggest-httpd, the other is learning data from already existing log files.

### 7.1.9.3.1. Learning data from groonga-suggest-httpd

Execute groonga-suggest-learner.:

    groonga-suggest-learner testdb/db

### 7.1.9.3.2. Learning data from log files

Execute groonga-suggest-learner with `-l` option.

Here is the sample to load log data under `logs` directory:

    groonga-suggest-learner -l logs testdb/db

## 7.1.9.4. オプション

-r <endpoint>, --receive-endpoint <endpoint>

  Uses `<endpoint>` as the receiver endpoint.

-s <endpoint>, --send-endpoint <endpoint>

  Uses `<endpoint>` as the sender endpoint.

-d, --daemon

  Runs as a daemon.

-l <directory>, --log-base-path <directory>

  Reads logs from `<directory>`.

--log-path <path>

  Outputs log to `<path>`.

--log-level <level>

  Uses `<level>` for log level. `<level>` must be between 1 and 9. Larger level outputs more logs.

## 7.1.9.5. 引数

必須の引数は1つです。

### 7.1.9.5.1. `database_path`

groongaデータベースのパスを指定します。

## 7.1.9.6. 関連するテーブル

Here is the list of table which learned data is stored. If you specify `query` as dataset name, following `_DATASET` suffix are replaced. Thus, `event_query` table is used.

- event_DATASET