[Groonga-commit] groonga/groonga at bf1d71a [master] doc prefix RK search: add usage

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Nov 24 18:46:19 JST 2015


Kouhei Sutou	2015-11-24 18:46:19 +0900 (Tue, 24 Nov 2015)

  New Revision: bf1d71a4754fd5ac12bf50379aa8246a4ff7e2ce
  https://github.com/groonga/groonga/commit/bf1d71a4754fd5ac12bf50379aa8246a4ff7e2ce

  Message:
    doc prefix RK search: add usage

  Added files:
    doc/source/example/reference/operations/prefix_rk_search/usage_register_kana.log
  Modified files:
    doc/source/reference/operations/prefix_rk_search.rst

  Added: doc/source/example/reference/operations/prefix_rk_search/usage_register_kana.log (+11 -0) 100644
===================================================================
--- /dev/null
+++ doc/source/example/reference/operations/prefix_rk_search/usage_register_kana.log    2015-11-24 18:46:19 +0900 (d03aeaf)
@@ -0,0 +1,11 @@
+Execution example::
+
+  table_create Readings TABLE_PAT_KEY ShortText
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  load --table Readings
+  [
+  {"_key": "ニホン"},
+  {"_key": "ニッポン"},
+  {"_key": "ローマジ"}
+  ]
+  # [[0, 1337566253.89858, 0.000355720520019531], 3]

  Modified: doc/source/reference/operations/prefix_rk_search.rst (+28 -2)
===================================================================
--- doc/source/reference/operations/prefix_rk_search.rst    2015-11-24 18:37:15 +0900 (8f34ecb)
+++ doc/source/reference/operations/prefix_rk_search.rst    2015-11-24 18:46:19 +0900 (be44887)
@@ -2,6 +2,9 @@
 
 .. highlightlang:: none
 
+.. groonga-command
+.. database: operations_prefix_rk_search
+
 Prefix RK search
 ================
 
@@ -26,11 +29,34 @@ find "日本" by "ni", "に" or "二".
 The feature is helpful because it reduces one or more operations of
 users.
 
-This feature is used in :doc:`/reference/suggest/complete`.
+This feature is used in :doc:`/reference/suggest/completion`.
 
 You can use this feature in :ref:`select-filter` by
 :doc:`/reference/functions/prefix_rk_search`.
 
+Usage
+-----
+
+You need :ref:`table-pat-key` table for using prefix RK search.
+
+You need to put kana in katakana to ``TABLE_PAT_KEY`` as key:
+
+.. groonga-command
+.. include:: ../../example/reference/operations/prefix_rk_search/usage_register_kana.log
+.. table_create Readings TABLE_PAT_KEY ShortText
+.. load --table Readings
+.. [
+.. {"_key": "ニホン"},
+.. {"_key": "ニッポン"},
+.. {"_key": "ローマジ"}
+.. ]
+
+You can finds ``ニホン`` and ``ニッポン`` by prefix RK search with
+``ni`` as query from the ``Readings`` table.
+
+You can finds ``ローマジ`` by prefix RK search with ``r`` as query
+from the ``Readings`` table.
+
 How to convert romaji to kana
 -----------------------------
 
@@ -46,5 +72,5 @@ Normally, you can get converted results as expected.
 See also
 --------
 
-  * :doc:`/reference/suggest/complete`
+  * :doc:`/reference/suggest/completion`
   * :doc:`/reference/functions/prefix_rk_search`
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index