Kouhei Sutou
null+****@clear*****
Mon Mar 27 12:35:45 JST 2017
Kouhei Sutou 2017-03-27 12:35:45 +0900 (Mon, 27 Mar 2017) New Revision: 0aa9cbf58169565713bcd1ca5482e1e6fda3e4cf https://github.com/groonga/groonga/commit/0aa9cbf58169565713bcd1ca5482e1e6fda3e4cf Message: doc logical_select: update Added files: doc/source/example/reference/commands/logical_select/drilldown_filter.log doc/source/example/reference/commands/logical_select/drilldowns_label_filter.log doc/source/example/reference/commands/logical_select/match_columns.log doc/source/example/reference/commands/logical_select/query.log Modified files: doc/source/example/reference/commands/logical_select/logical_table_nonexistent.log doc/source/reference/commands/logical_select.rst Added: doc/source/example/reference/commands/logical_select/drilldown_filter.log (+53 -0) 100644 =================================================================== --- /dev/null +++ doc/source/example/reference/commands/logical_select/drilldown_filter.log 2017-03-27 12:35:45 +0900 (92939f7) @@ -0,0 +1,53 @@ +Execution example:: + + logical_select \ + --logical_table Entries \ + --shard_key created_at \ + --limit 0 \ + --output_columns _id \ + --drilldown tag \ + --drilldown_filter "_nsubrecs > 1" \ + --drilldown_output_columns _key,_nsubrecs + # [ + # [ + # 0, + # 1337566253.89858, + # 0.000355720520019531 + # ], + # [ + # [ + # [ + # 5 + # ], + # [ + # [ + # "_id", + # "UInt32" + # ] + # ] + # ], + # [ + # [ + # 2 + # ], + # [ + # [ + # "_key", + # "ShortText" + # ], + # [ + # "_nsubrecs", + # "Int32" + # ] + # ], + # [ + # "Groonga", + # 2 + # ], + # [ + # "Senna", + # 2 + # ] + # ] + # ] + # ] Added: doc/source/example/reference/commands/logical_select/drilldowns_label_filter.log (+59 -0) 100644 =================================================================== --- /dev/null +++ doc/source/example/reference/commands/logical_select/drilldowns_label_filter.log 2017-03-27 12:35:45 +0900 (4a85b0e) @@ -0,0 +1,59 @@ +Execution example:: + + logical_select \ + --logical_table Entries \ + --shard_key created_at \ + --limit 0 \ + --output_columns _id \ + --drilldowns[tag].keys tag \ + --drilldowns[tag].tiler "_nsubrecs > 1" \ + --drilldowns[tag].output_columns _key,_nsubrecs + # [ + # [ + # 0, + # 1337566253.89858, + # 0.000355720520019531 + # ], + # [ + # [ + # [ + # 5 + # ], + # [ + # [ + # "_id", + # "UInt32" + # ] + # ] + # ], + # { + # "tag": [ + # [ + # 3 + # ], + # [ + # [ + # "_key", + # "ShortText" + # ], + # [ + # "_nsubrecs", + # "Int32" + # ] + # ], + # [ + # "Hello", + # 1 + # ], + # [ + # "Groonga", + # 2 + # ], + # [ + # "Senna", + # 2 + # ] + # ] + # } + # ] + # ] Modified: doc/source/example/reference/commands/logical_select/logical_table_nonexistent.log (+1 -1) =================================================================== --- doc/source/example/reference/commands/logical_select/logical_table_nonexistent.log 2017-03-27 12:14:00 +0900 (8e7502a) +++ doc/source/example/reference/commands/logical_select/logical_table_nonexistent.log 2017-03-27 12:35:45 +0900 (9a6e729) @@ -11,7 +11,7 @@ Execution example:: # [ # "Groonga::Sharding::LogicalSelectCommand::Executor.execute_search", # "/home/kou/work/c/groonga.clean/plugins/sharding/logical_select.rb", - # 469 + # 722 # ] # ] # ] Added: doc/source/example/reference/commands/logical_select/match_columns.log (+63 -0) 100644 =================================================================== --- /dev/null +++ doc/source/example/reference/commands/logical_select/match_columns.log 2017-03-27 12:35:45 +0900 (fc343bb) @@ -0,0 +1,63 @@ +Execution example:: + + logical_select \ + --logical_table Entries \ + --shard_key created_at \ + --match_columns content \ + --query "fast" + # [ + # [ + # 0, + # 1337566253.89858, + # 0.000355720520019531 + # ], + # [ + # [ + # [ + # 2 + # ], + # [ + # [ + # "_id", + # "UInt32" + # ], + # [ + # "_key", + # "ShortText" + # ], + # [ + # "content", + # "Text" + # ], + # [ + # "created_at", + # "Time" + # ], + # [ + # "n_likes", + # "UInt32" + # ], + # [ + # "tag", + # "ShortText" + # ] + # ], + # [ + # 2, + # "Groonga", + # "I started to use Groonga. It's very fast!", + # 1436284800.0, + # 10, + # "Groonga" + # ], + # [ + # 3, + # "Mroonga", + # "I also started to use Mroonga. It's also very fast! Really fast!", + # 1436288400.0, + # 15, + # "Groonga" + # ] + # ] + # ] + # ] Added: doc/source/example/reference/commands/logical_select/query.log (+62 -0) 100644 =================================================================== --- /dev/null +++ doc/source/example/reference/commands/logical_select/query.log 2017-03-27 12:35:45 +0900 (948969d) @@ -0,0 +1,62 @@ +Execution example:: + + logical_select \ + --logical_table Entries \ + --shard_key created_at \ + --query "content:@fast" + # [ + # [ + # 0, + # 1337566253.89858, + # 0.000355720520019531 + # ], + # [ + # [ + # [ + # 2 + # ], + # [ + # [ + # "_id", + # "UInt32" + # ], + # [ + # "_key", + # "ShortText" + # ], + # [ + # "content", + # "Text" + # ], + # [ + # "created_at", + # "Time" + # ], + # [ + # "n_likes", + # "UInt32" + # ], + # [ + # "tag", + # "ShortText" + # ] + # ], + # [ + # 2, + # "Groonga", + # "I started to use Groonga. It's very fast!", + # 1436284800.0, + # 10, + # "Groonga" + # ], + # [ + # 3, + # "Mroonga", + # "I also started to use Mroonga. It's also very fast! Really fast!", + # 1436288400.0, + # 15, + # "Groonga" + # ] + # ] + # ] + # ] Modified: doc/source/reference/commands/logical_select.rst (+83 -3) =================================================================== --- doc/source/reference/commands/logical_select.rst 2017-03-27 12:14:00 +0900 (3f7c30d) +++ doc/source/reference/commands/logical_select.rst 2017-03-27 12:35:45 +0900 (c56bf89) @@ -48,6 +48,9 @@ parameters are optional:: [drilldown_calc_target=null] [sort_keys=null] [drilldown_sort_keys=null] + [match_columns=null] + [query=null] + [drilldown_filter=null] ``logical_select`` has the following named parameters for advanced drilldown: @@ -59,6 +62,7 @@ drilldown: * ``drilldowns[${LABEL}].limit=10`` * ``drilldowns[${LABEL}].calc_types=NONE`` * ``drilldowns[${LABEL}].calc_target=null`` + * ``drilldowns[${LABEL}].filter=null`` .. deprecated:: 6.1.4 @@ -104,7 +108,6 @@ But there are some differences from :doc:`select`: doesn't work with multiple shards. It works with one shard. ``_key`` in ``drilldowns[${LABEL}].sort_keys`` work with multiple shards. - * ``match_columns`` and ``query`` aren't supported yet. * ``cache`` isn't supported yet. * ``match_escalation_threshold`` isn't supported yet. * ``query_flags`` isn't supported yet. @@ -385,14 +388,43 @@ only supported for now. ``match_columns`` """"""""""""""""" -Not implemented yet. +.. versionadded:: 7.0.1 + +Corresponds to :ref:`select-match-columns` in :doc:`select`. See +:ref:`select-match-columns` for details. + +Here is an example to find records that include ``"fast"`` text in +``content`` column: + +.. groonga-command +.. include:: ../../example/reference/commands/logical_select/match_columns.log +.. logical_select \ +.. --logical_table Entries \ +.. --shard_key created_at \ +.. --match_columns content \ +.. --query "fast" .. _logical-select-query: ``query`` """"""""" -Not implemented yet. +.. versionadded:: 7.0.1 + +Corresponds to :ref:`select-query` in :doc:`select`. See +:ref:`select-query-columns` for details. + +Here is an example to find records that include ``"fast"`` text in +``content`` column: + +.. groonga-command +.. include:: ../../example/reference/commands/logical_select/query.log +.. logical_select \ +.. --logical_table Entries \ +.. --shard_key created_at \ +.. --query "content:@fast" + +See also :ref:`logical-select-match-columns`. .. _logical-select-filter: @@ -681,6 +713,30 @@ Corresponds to :ref:`select-drilldown-calc-target` in See also :ref:`logical-select-drilldown-calc-types` for an example. +.. _logical-select-drilldown-filter: + +``drilldown_filter`` +"""""""""""""""""""" + +.. versionadded:: 7.0.1 + +Corresponds to :ref:`select-drilldown-filter` in +:doc:`select`. See :ref:`select-drilldown-filter` for details. + +Here is an example to suppress drilled down tags that are occurred +only once: + +.. groonga-command +.. include:: ../../example/reference/commands/logical_select/drilldown_filter.log +.. logical_select \ +.. --logical_table Entries \ +.. --shard_key created_at \ +.. --limit 0 \ +.. --output_columns _id \ +.. --drilldown tag \ +.. --drilldown_filter "_nsubrecs > 1" \ +.. --drilldown_output_columns _key,_nsubrecs + .. _logical-select-advanced-drilldown-related-parameters: Advanced drilldown related parameters @@ -852,6 +908,30 @@ labeled drilldown. See also :ref:`logical-select-drilldowns-label-calc-types` for an example. +.. _logical-select-drilldowns-label-filter: + +``drilldowns[${LABEL}].filter`` +""""""""""""""""""""""""""""""" + +.. versionadded:: 7.0.1 + +Corresponds to :ref:`logical-select-drilldown-filter` in not labeled +drilldown. + +Here is an example to suppress drilled down tags that are occurred +only once: + +.. groonga-command +.. include:: ../../example/reference/commands/logical_select/drilldowns_label_filter.log +.. logical_select \ +.. --logical_table Entries \ +.. --shard_key created_at \ +.. --limit 0 \ +.. --output_columns _id \ +.. --drilldowns[tag].keys tag \ +.. --drilldowns[tag].tiler "_nsubrecs > 1" \ +.. --drilldowns[tag].output_columns _key,_nsubrecs + Return value ------------ -------------- next part -------------- HTML����������������������������...Download