If you create dataset which is named as query by
groonga-suggest-create-dataset
executable file, you can update pairs of registered word and its
reading by loading data to _key and kana column of
item_query table explicitly for prefix RK search.

Cooccurrence search can find registered words from user's
partial input. It uses user input sequences that will be
learned from query logs, access logs and so on.

For example, there is the following user input sequence:

input

submit

s

no

se

no

sea

no

sear

no

searc

no

search

yes

e

no

en

no

eng

no

engi

no

engin

no

engine

no

enginen

no (typo!)

engine

yes

Groonga creates the following completion pairs:

input

completed word

s

search

se

search

sea

search

sear

search

searc

search

e

engine

en

engine

eng

engine

engi

engine

engin

engine

engine

engine

enginen

engine

All user not-submitted inputs (e.g. "s", "se" and so on)
before each an user submission maps to the submitted input
(e.g. "search").

To be precise, this description isn't correct because it
omits about time stamp. Groonga doesn't case about "all user
not-submitted inputs before each an user
submission". Groonga just case about "all user not-submitted
inputs within a minute from an user submission before each
an user submission". Groonga doesn't treat user inputs
before a minute ago.

If an user inputs "sea" and cooccurrence search returns
"search" because "sea" is in input column and corresponding
completed word column value is "search".

Cooccurrence search uses learned data. They are based on
query logs, access logs and so on. To create learned data,
Groonga needs user input sequence with time stamp and user
submit input with time stamp.

For example, an user wants to search by "engine". The user
inputs the query with the following sequence:

2011-08-10T13:33:23+09:00: e

2011-08-10T13:33:23+09:00: en

2011-08-10T13:33:24+09:00: eng

2011-08-10T13:33:24+09:00: engi

2011-08-10T13:33:24+09:00: engin

2011-08-10T13:33:25+09:00: engine (submit!)

Groonga can be learned from the input sequence by the
following command: