[Groonga-commit] groonga/groonga at f66d284 [master] doc: add vector_size document

Back to archive index

HAYASHI Kentaro null+****@clear*****
Tue Apr 28 15:42:52 JST 2015


HAYASHI Kentaro	2015-04-28 15:42:52 +0900 (Tue, 28 Apr 2015)

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

  Message:
    doc: add vector_size document

  Added files:
    doc/source/reference/functions/vector_size.rst

  Added: doc/source/reference/functions/vector_size.rst (+71 -0) 100644
===================================================================
--- /dev/null
+++ doc/source/reference/functions/vector_size.rst    2015-04-28 15:42:52 +0900 (a724002)
@@ -0,0 +1,71 @@
+.. -*- rst -*-
+
+.. highlightlang:: none
+
+.. groonga-command
+.. database: vector_size
+
+vector_size
+===========
+
+Summary
+-------
+
+.. versionadded:: 5.0.3
+
+``vector_size`` returns the value of vector column size.
+
+Use ``--command_version 2`` to enable this feature.
+
+Syntax
+------
+
+``vector_size`` requires one argument - ``target``.
+
+::
+
+  vector_size(target)
+
+Usage
+-----
+
+Here is a schema definition and sample data.
+
+Sample schema:
+
+.. groonga-command
+.. include:: ../../example/reference/functions/vector_size/usage_setup_schema.log
+.. table_create Memos TABLE_HASH_KEY ShortText
+.. column_create Memos tags COLUMN_VECTOR ShortText
+
+Sample data:
+
+.. groonga-command
+.. include:: ../../example/reference/functions/vector_size/usage_setup_data.log
+.. load --table Memos
+.. [
+.. {"_key": "Groonga",          "tags": ["Groonga"]},
+.. {"_key": "Rroonga",          "tags": ["Groonga", "Ruby"]},
+.. {"_key": "Nothing"}
+.. ]
+
+Here is the simple usage of ``vector_size`` function which returns tags and size - the value of ``tags`` column and size of it.
+
+.. groonga-command
+.. include:: ../../example/reference/functions/vector_size/usage_only.log
+.. select Memos --output_columns 'tags, vector_size(tags)' --command-version 2
+
+Parameters
+----------
+
+There are one required parameter, ``target``.
+
+``target``
+^^^^^^^^^^^^^^^^
+
+Specifies a vector column of table that is specified by ``table`` parameter in ``select``.
+
+Return value
+------------
+
+``vector_size`` returns the value of target vector column size.
-------------- next part --------------
HTML����������������������������...
Download 



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