Navigation Menu

Skip to content

Commit

Permalink
doc logical_range_filter: add execution examples of logical_table
Browse files Browse the repository at this point in the history
  • Loading branch information
komainu8 committed Feb 20, 2018
1 parent 363414c commit 54438ae
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 4 deletions.
@@ -0,0 +1,70 @@
Execution example::

logical_range_filter --logical_table Entries --shard_key created_at

# [
# [
# 0,
# 1519131606.676006,
# 0.0006020069122314453
# ],
# [
# [
# [
# "_key",
# "ShortText"
# ],
# [
# "content",
# "Text"
# ],
# [
# "created_at",
# "Time"
# ],
# [
# "n_likes",
# "UInt32"
# ],
# [
# "tag",
# "ShortText"
# ]
# ],
# [
# "The first post!",
# "Welcome! This is my first post!",
# 1436281200.0,
# 5,
# "Hello"
# ],
# [
# "Groonga",
# "I started to use Groonga. It's very fast!",
# 1436284800.0,
# 10,
# "Groonga"
# ],
# [
# "Mroonga",
# "I also started to use Mroonga. It's also very fast! Really fast!",
# 1436288400.0,
# 15,
# "Groonga"
# ],
# [
# "Good-bye Senna",
# "I migrated all Senna system!",
# 1436367600.0,
# 3,
# "Senna"
# ],
# [
# "Good-bye Tritonn",
# "I also migrated all Tritonn system!",
# 1436371200.0,
# 3,
# "Senna"
# ]
# ]
# ]
@@ -0,0 +1,18 @@
Execution example::

logical_range_filter --logical_table Nonexistent --shard_key created_at
# [
# [
# -22,
# 1519132441.586192,
# 0.0005924701690673828,
# "[logical_range_filter] no shard exists: logical_table: <Nonexistent>: shard_key: <created_at>",
# [
# [
# "Groonga::Sharding::LogicalRangeFilterCommand::Executor.execute",
# "/tmp/local/lib/groonga/plugins/sharding/logical_range_filter.rb",
# 193
# ]
# ]
# ]
# ]
16 changes: 12 additions & 4 deletions doc/source/reference/commands/logical_range_filter.rst
Expand Up @@ -219,11 +219,19 @@ There are required parameters, ``logical_table`` and ``shard_key``.
"""""""""""""""""

Specifies logical table name. It means table name without
``_YYYYMMDD`` postfix. If you use actual table such as
``Logs_20150203``, ``Logs_20150203`` and so on, logical table name is
``Logs``.
``_YYYYMMDD`` postfix. If you use actual table such as
``Entries_20150708``, ``Entries_20150709`` and so on, logical table
name is ``Entries``.

TODO: Add examples
.. groonga-command
.. include:: ../../example/reference/commands/logical_range_filter/logical_table_existent.log
.. logical_range_filter --logical_table Entries --shard_key created_at
If nonexistent table is specified, an error is returned.

.. groonga-command
.. include:: ../../example/reference/commands/logical_range_filter/logical_table_nonexistent.log
.. logical_range_filter --logical_table Nonexistent --shard_key created_at
``shard_key``
"""""""""""""
Expand Down

0 comments on commit 54438ae

Please sign in to comment.