[Groonga-commit] groonga/groonga [master] doc: add execution examples

Back to archive index

HAYASHI Kentaro null+****@clear*****
Fri Nov 30 16:25:33 JST 2012


HAYASHI Kentaro	2012-11-30 16:25:33 +0900 (Fri, 30 Nov 2012)

  New Revision: 370a61a50d23b7e3b36d95db2c3ad025bcde3682
  https://github.com/groonga/groonga/commit/370a61a50d23b7e3b36d95db2c3ad025bcde3682

  Log:
    doc: add execution examples

  Added files:
    doc/source/example/tutorial/match_columns-nested-index-data.log
    doc/source/example/tutorial/match_columns-nested-index-data2.log
    doc/source/example/tutorial/match_columns-nested-index-schema.log
    doc/source/example/tutorial/match_columns-nested-index-schema2.log
    doc/source/example/tutorial/match_columns-nested-index-select.log
    doc/source/example/tutorial/match_columns-nested-index-select2.log

  Added: doc/source/example/tutorial/match_columns-nested-index-data.log (+16 -0) 100644
===================================================================
--- /dev/null
+++ doc/source/example/tutorial/match_columns-nested-index-data.log    2012-11-30 16:25:33 +0900 (c359782)
@@ -0,0 +1,16 @@
+Execution example::
+
+  load --table Comments
+  [
+  {"_key": 1, "content": "I'm using groonga too!"},
+  {"_key": 2, "content": "I'm using groonga and mroonga!"},
+  {"_key": 3, "content": "I'm using mroonga too!"}
+  ]
+  # [[0, 1337566253.89858, 0.000355720520019531], 3]
+  load --table Articles
+  [
+  {"content": "Groonga is fast!", "comment": 1},
+  {"content": "Groonga is useful!"},
+  {"content": "Mroonga is fast!", "comment": 3}
+  ]
+  # [[0, 1337566253.89858, 0.000355720520019531], 3]

  Added: doc/source/example/tutorial/match_columns-nested-index-data2.log (+23 -0) 100644
===================================================================
--- /dev/null
+++ doc/source/example/tutorial/match_columns-nested-index-data2.log    2012-11-30 16:25:33 +0900 (5e66ae4)
@@ -0,0 +1,23 @@
+Execution example::
+
+  load --table Replies2
+  [
+  {"_key": 1, "content": "I'm using rroonga too!"},
+  {"_key": 2, "content": "I'm using groonga and mroonga and rroonga!"},
+  {"_key": 3, "content": "I'm using nroonga too!"}
+  ]
+  # [[0, 1337566253.89858, 0.000355720520019531], 3]
+  load --table Comments2
+  [
+  {"_key": 1, "content": "I'm using groonga too!", "comment": 1},
+  {"_key": 2, "content": "I'm using groonga and mroonga!", "comment": 2},
+  {"_key": 3, "content": "I'm using mroonga too!"}
+  ]
+  # [[0, 1337566253.89858, 0.000355720520019531], 3]
+  load --table Articles2
+  [
+  {"content": "Groonga is fast!", "comment": 1},
+  {"content": "Groonga is useful!", "comment": 2},
+  {"content": "Mroonga is fast!", "comment": 3}
+  ]
+  # [[0, 1337566253.89858, 0.000355720520019531], 3]

  Added: doc/source/example/tutorial/match_columns-nested-index-schema.log (+20 -0) 100644
===================================================================
--- /dev/null
+++ doc/source/example/tutorial/match_columns-nested-index-schema.log    2012-11-30 16:25:33 +0900 (b893b6f)
@@ -0,0 +1,20 @@
+Execution example::
+
+  table_create Comments TABLE_HASH_KEY UInt32
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  column_create Comments content COLUMN_SCALAR ShortText
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  table_create Articles TABLE_NO_KEY
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  column_create Articles content COLUMN_SCALAR Text
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  column_create Articles comment COLUMN_SCALAR Comments
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  table_create Lexicon TABLE_PAT_KEY|KEY_NORMALIZE ShortText --default_tokenizer TokenBigram
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  column_create Lexicon articles_content COLUMN_INDEX|WITH_POSITION Articles content
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  column_create Lexicon comments_content COLUMN_INDEX|WITH_POSITION Comments content
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  column_create Comments article COLUMN_INDEX Articles comment
+  # [[0, 1337566253.89858, 0.000355720520019531], true]

  Added: doc/source/example/tutorial/match_columns-nested-index-schema2.log (+30 -0) 100644
===================================================================
--- /dev/null
+++ doc/source/example/tutorial/match_columns-nested-index-schema2.log    2012-11-30 16:25:33 +0900 (f7effa6)
@@ -0,0 +1,30 @@
+Execution example::
+
+  table_create Replies2 TABLE_HASH_KEY UInt32
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  column_create Replies2 content COLUMN_SCALAR ShortText
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  table_create Comments2 TABLE_HASH_KEY UInt32
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  column_create Comments2 content COLUMN_SCALAR ShortText
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  column_create Comments2 comment COLUMN_SCALAR Replies2
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  table_create Articles2 TABLE_NO_KEY
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  column_create Articles2 content COLUMN_SCALAR Text
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  column_create Articles2 comment COLUMN_SCALAR Comments2
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  table_create Lexicon2 TABLE_PAT_KEY|KEY_NORMALIZE ShortText --default_tokenizer TokenBigram
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  column_create Lexicon2 articles_content COLUMN_INDEX|WITH_POSITION Articles2 content
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  column_create Lexicon2 comments_content COLUMN_INDEX|WITH_POSITION Comments2 content
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  column_create Lexicon2 replies_content COLUMN_INDEX|WITH_POSITION Replies2 content
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  column_create Comments2 article COLUMN_INDEX Articles2 comment
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  column_create Replies2 reply_to COLUMN_INDEX Comments2 comment
+  # [[0, 1337566253.89858, 0.000355720520019531], true]

  Added: doc/source/example/tutorial/match_columns-nested-index-select.log (+41 -0) 100644
===================================================================
--- /dev/null
+++ doc/source/example/tutorial/match_columns-nested-index-select.log    2012-11-30 16:25:33 +0900 (d8302f0)
@@ -0,0 +1,41 @@
+Execution example::
+
+  select Articles --match_columns comment.content --query groonga --output_columns "_id, _score, *" 
+  # [
+  #   [
+  #     0, 
+  #     1337566253.89858, 
+  #     0.000355720520019531
+  #   ], 
+  #   [
+  #     [
+  #       [
+  #         1
+  #       ], 
+  #       [
+  #         [
+  #           "_id", 
+  #           "UInt32"
+  #         ], 
+  #         [
+  #           "_score", 
+  #           "Int32"
+  #         ], 
+  #         [
+  #           "comment", 
+  #           "Comments"
+  #         ], 
+  #         [
+  #           "content", 
+  #           "Text"
+  #         ]
+  #       ], 
+  #       [
+  #         1, 
+  #         1, 
+  #         1, 
+  #         "Groonga is fast!"
+  #       ]
+  #     ]
+  #   ]
+  # ]

  Added: doc/source/example/tutorial/match_columns-nested-index-select2.log (+86 -0) 100644
===================================================================
--- /dev/null
+++ doc/source/example/tutorial/match_columns-nested-index-select2.log    2012-11-30 16:25:33 +0900 (0d015da)
@@ -0,0 +1,86 @@
+Execution example::
+
+  select Articles2 --match_columns comment.content --query mroonga --output_columns "_id, _score, *" 
+  # [
+  #   [
+  #     0, 
+  #     1337566253.89858, 
+  #     0.000355720520019531
+  #   ], 
+  #   [
+  #     [
+  #       [
+  #         2
+  #       ], 
+  #       [
+  #         [
+  #           "_id", 
+  #           "UInt32"
+  #         ], 
+  #         [
+  #           "_score", 
+  #           "Int32"
+  #         ], 
+  #         [
+  #           "comment", 
+  #           "Comments2"
+  #         ], 
+  #         [
+  #           "content", 
+  #           "Text"
+  #         ]
+  #       ], 
+  #       [
+  #         2, 
+  #         1, 
+  #         2, 
+  #         "Groonga is useful!"
+  #       ], 
+  #       [
+  #         3, 
+  #         1, 
+  #         3, 
+  #         "Mroonga is fast!"
+  #       ]
+  #     ]
+  #   ]
+  # ]
+  select Articles2 --match_columns comment.comment.content --query mroonga --output_columns "_id, _score, *" 
+  # [
+  #   [
+  #     0, 
+  #     1337566253.89858, 
+  #     0.000355720520019531
+  #   ], 
+  #   [
+  #     [
+  #       [
+  #         1
+  #       ], 
+  #       [
+  #         [
+  #           "_id", 
+  #           "UInt32"
+  #         ], 
+  #         [
+  #           "_score", 
+  #           "Int32"
+  #         ], 
+  #         [
+  #           "comment", 
+  #           "Comments2"
+  #         ], 
+  #         [
+  #           "content", 
+  #           "Text"
+  #         ]
+  #       ], 
+  #       [
+  #         2, 
+  #         1, 
+  #         2, 
+  #         "Groonga is useful!"
+  #       ]
+  #     ]
+  #   ]
+  # ]
-------------- next part --------------
HTML����������������������������...
Download 



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