.. -*- rst -*- .. highlightlang:: none .. groonga-command .. database: tutorial-micro-blog ãã¤ã¯ãããã°æ¤ç´¢ã·ã¹ãã ã®ä½æ ================================ ããã¾ã§å¦ãã groongaã®æ©è½ãç¨ãã¦ããã¤ã¯ãããã°ã®æ¤ç´¢ã·ã¹ãã ãä½æãã¦ã¿ã¾ãããããã¤ã¯ãããã°ã¨ã¯ãTwitterã®ãããªçãã¡ãã»ã¼ã¸ãæ稿ããããã°ã§ãã ãã¼ãã«ã®ä½æ -------------- ã¾ãã¯ããã¼ãã«ãä½æãã¾ãã :: table_create --name Users --flags TABLE_HASH_KEY --key_type ShortText table_create --name Comments --flags TABLE_HASH_KEY --key_type ShortText table_create --name HashTags --flags TABLE_HASH_KEY --key_type ShortText table_create --name Bigram --flags TABLE_PAT_KEY|KEY_NORMALIZE --key_type ShortText --default_tokenizer TokenBigram table_create --name GeoIndex --flags TABLE_PAT_KEY --key_type WGS84GeoPoint column_create --table Users --name name --flags COLUMN_SCALAR --type ShortText column_create --table Users --name follower --flags COLUMN_VECTOR --type Users column_create --table Users --name favorites --flags COLUMN_VECTOR --type Comments column_create --table Users --name location --flags COLUMN_SCALAR --type WGS84GeoPoint column_create --table Users --name location_str --flags COLUMN_SCALAR --type ShortText column_create --table Users --name description --flags COLUMN_SCALAR --type ShortText column_create --table Users --name followee --flags COLUMN_INDEX --type Users --source follower column_create --table Comments --name comment --flags COLUMN_SCALAR --type ShortText column_create --table Comments --name last_modified --flags COLUMN_SCALAR --type Time column_create --table Comments --name replied_to --flags COLUMN_SCALAR --type Comments column_create --table Comments --name replied_users --flags COLUMN_VECTOR --type Users column_create --table Comments --name hash_tags --flags COLUMN_VECTOR --type HashTags column_create --table Comments --name location --flags COLUMN_SCALAR --type WGS84GeoPoint column_create --table Comments --name posted_by --flags COLUMN_SCALAR --type Users column_create --table Comments --name favorited_by --flags COLUMN_INDEX --type Users --source favorites column_create --table HashTags --name hash_index --flags COLUMN_INDEX --type Comments --source hash_tags column_create --table Bigram --name users_index --flags COLUMN_INDEX|WITH_POSITION|WITH_SECTION --type Users --source name,location_str,description column_create --table Bigram --name comment_index --flags COLUMN_INDEX|WITH_POSITION --type Comments --source comment column_create --table GeoIndex --name users_location --type Users --flags COLUMN_INDEX --source location column_create --table GeoIndex --name comments_location --type Comments --flags COLUMN_INDEX --source location Usersãã¼ãã« ^^^^^^^^^^^^^ ã¦ã¼ã¶ã¼ã®ååãèªå·±ç´¹ä»æããã©ãã¼ãã¦ããã¦ã¼ã¶ã¼ä¸è¦§ãªã©ãã¦ã¼ã¶ã¼æ å ±ãæ ¼ç´ããããã®ãã¼ãã«ã§ãã ``_key`` ã¦ã¼ã¶ã¼ID ``name`` ã¦ã¼ã¶ã¼å ``follower`` ãã©ãã¼ãã¦ããã¦ã¼ã¶ã¼ã®ä¸è¦§ ``favorites`` ãæ°ã«å ¥ãã®ã³ã¡ã³ãä¸è¦§ ``location`` ã¦ã¼ã¶ã¼ã®ç¾å¨å°ï¼ç·¯åº¦çµåº¦åº§æ¨ï¼ ``location_str`` ã¦ã¼ã¶ã¼ã®ç¾å¨å°ï¼æååï¼ ``description`` ã¦ã¼ã¶ã¼ã®èªå·±ç´¹ä» ``followee`` Usersãã¼ãã«ã®followerã«ã©ã ã«å¯¾ããã¤ã³ããã¯ã¹ã ãã®ã¤ã³ããã¯ã¹ãä½ããã¨ã§ãããã¦ã¼ã¶ã¼ããã©ãã¼ãã¦ããã¦ã¼ã¶ã¼ãæ¤ç´¢ã§ããããã«ãªãã¾ãã Commentsãã¼ãã« ^^^^^^^^^^^^^^^^ ã³ã¡ã³ãå 容ãæ稿æ¥æãè¿ä¿¡å æ å ±ãªã©ãã³ã¡ã³ãã«é¢ããå 容ãæ ¼ç´ãããã¼ãã«ã§ãã ``_key`` ã³ã¡ã³ãID ``comment`` ã³ã¡ã³ãå 容 ``last_modified`` æ稿æ¥æ ``replied_to`` è¿ä¿¡å ã®ã³ã¡ã³ãå 容 ``replied_users`` è¿ä¿¡å ã®ã¦ã¼ã¶ã¼ã®ä¸è¦§ ``hash_tags`` ã³ã¡ã³ãã®ããã·ã¥ã¿ã°ã®ä¸è¦§ ``location`` æç¨¿å ´æ(緯度çµåº¦åº§æ¨ã®ãã) ``posted_by`` ã³ã¡ã³ããæ¸ããã¦ã¼ã¶ã¼ ``favorited_by`` Usersãã¼ãã«ã®favoritesã«ã©ã ã«å¯¾ããã¤ã³ããã¯ã¹ã ãã®ã¤ã³ããã¯ã¹ãä½ããã¨ã§ãæå®ããã³ã¡ã³ãã誰ããæ°ã«å ¥ãã«å ¥ãã¦ããã®ããæ¤ç´¢ã§ããããã«ãªãã¾ãã HashTagsãã¼ãã« ^^^^^^^^^^^^^^^^ ã³ã¡ã³ãã®ããã·ã¥ã¿ã°ãä¸è¦§ã§ä¿åããããã®ãã¼ãã«ã§ãã ``_key`` ããã·ã¥ã¿ã° ``hash_index`` ãComments.hash_tagsãã®ã¤ã³ããã¯ã¹ã ãã®ã¤ã³ããã¯ã¹ãä½ããã¨ã§ãæå®ããããã·ã¥ã¿ã°ã®ã¤ãã¦ããã³ã¡ã³ãã®ä¸è¦§ãåºããã¨ãåºæ¥ãããã«ãªãã¾ãã Bigramãã¼ãã« ^^^^^^^^^^^^^^ ã¦ã¼ã¶ã¼æ å ±ã»ã³ã¡ã³ãã§å ¨ææ¤ç´¢ãåºæ¥ãããã«ããããã®ã¤ã³ããã¯ã¹ãæ ¼ç´ãããã¼ãã«ã§ãã ``_key`` åèª ``users_index`` ã¦ã¼ã¶ã¼æ å ±ã®ã¤ã³ããã¯ã¹ã ãã®ã«ã©ã ã¯ãã¦ã¼ã¶ã¼åãUsers.nameããç¾å¨å°ãUsers.location_strããèªå·±ç´¹ä»æãUsers.descriptionãã®ã¤ã³ããã¯ã¹ã«ãªã£ã¦ãã¾ãã ``comment_index`` ã³ã¡ã³ãå 容ãComments.commentãã®ã¤ã³ããã¯ã¹ GeoIndex table ^^^^^^^^^^^^^^ This is the table which stores indexes of location column to search geo location effectively. ``users_location`` Indexes of location column for Users table ``comments_location`` Indexes of location column for Comments table ãã¼ã¿ã®ãã¼ã -------------- ã¤ã¥ãã¦ããã¹ãç¨ãã¼ã¿ããã¼ããã¾ãã :: load --table Users [ { "_key": "daijiro", "name": "hsiomaneki", "follower": ["tasukuchan"], "favorites": [], "location": "127678039x502643091", "location_str": "ç¥å¥å·ç", "description": "groonga developer" }, { "_key": "tasukuchan", "name": "ã°ãã£ã©ãã", "follower": ["daijiro","OffGao"], "favorites": ["daijiro:1","OffGao:1"], "location": "128423343x502929252", "location_str": "æ±äº¬é½æ¸è°·åº", "description": "ã¨ãããã£ãã" }, { "_key": "OffGao", "name": "OffGao", "follower": ["tasukuchan","daijiro"], "favorites": ["tasukuchan:1","daijiro:1"], "location": "128544408x502801502", "location_str": "æ±äº¬é½ä¸éåº", "description": "ãããã" } ] load --table Comments [ { "_key": "daijiro:1", "comment": "ãã¤ã¯ãããã°ä½ã£ã¦ã¿ã¾ããï¼çæ ããã¡ããã¾ããçãªæãã§ï¼ã", "last_modified": "2010/03/17 12:05:00", "posted_by": "daijiro", }, { "_key": "tasukuchan:1", "comment": "åã®æ¸ãè¾¼ã¿ããã¹ããã¹ãã", "last_modified": "2010/03/17 12:00:00", "posted_by": "tasukuchan", }, { "_key": "daijiro:2", "comment": "@tasukuchan ãããã!!!", "last_modified": "2010/03/17 12:05:00", "replied_to": "tasukuchan:1", "replied_users": ["tasukuchan"], "posted_by": "daijiro", }, { "_key": "tasukuchan:2", "comment": "@daijiro ãããã¨ãï¼", "last_modified": "2010/03/17 13:00:00", "replied_to": "daijiro:2", "replied_users": ["daijiro"], "posted_by": "tasukuchan", }, { "_key": "tasukuchan:3", "comment": "groongaãªã #groonga", "last_modified": "2010/03/17 14:00:00", "hash_tags": ["groonga"], "location": "127972422x503117107", "posted_by": "tasukuchan", }, { "_key": "tasukuchan:4", "comment": "groongaéçºå宿ã®ããç¾½ç°ç©ºæ¸¯ã«æ¥ã¾ããï¼ #groonga #travel", "last_modified": "2010/03/17 14:05:00", "hash_tags": ["groonga", "travel"], "location": "127975798x502919856", "posted_by": "tasukuchan", }, { "_key": "OffGao:1", "comment": "@daijiro @tasukuchan ç»é²ãã¦ã¿ã¾ãããã¼ï¼", "last_modified": "2010/03/17 15:00:00", "replied_users": ["daijiro", "tasukuchan"], "location": "128551935x502796433", "posted_by": "OffGao", } { "_key": "OffGao:2", "comment": "ä¸éããã¼ãã¦ã§ã¤ãªããªã", "last_modified": "2010/03/17 15:05:00", "location": "128551935x502796434", "posted_by": "OffGao", } ] Usersãã¼ãã«ã®followerã«ã©ã ã¨favoritesã«ã©ã ãããã¦Commentsãã¼ãã«ã®replied_usersã«ã©ã ã¯ããã¯ã¿ã¼ã«ã©ã ã§ãããã®ããããããã®ã«ã©ã ã¯é åã§å¤ãæå®ãã¾ãã Usersãã¼ãã«ã®locationã«ã©ã ã¨ãCommentsãã¼ãã«ã®locationã«ã©ã ã¯ãGeoPointåã§ãããã®åã§ã®å¤ã®æå®ã¯ã"[緯度]x[çµåº¦]"ã¨è¨è¿°ãã¦æå®ãã¾ãã Commentsãã¼ãã«ã®last_modifiedã«ã©ã ã¯ãTimeåã§ãããã®åã§ã®å¤ãæå®ããæ¹æ³ã¯2ã¤ããã¾ãã 1ã¤ç®ã®æ¹æ³ã¯ã1970å¹´1æ1æ¥0æ0å0ç§ããã®çµéç§æ°ã®å¤ãç´æ¥æå®ããæ¹æ³ã§ãããã®ã¨ããå°æ°é¨åãæå®ãããã¨ã§ãã¤ã¯ãç§æ°ã§ã®æå®ãå¯è½ã§ããæå®ããå¤ã¯ããã¼ã¿ã®ãã¼ãã®éã«ãã¤ã¯ãç§ãåä½ã¨ããæ´æ°å¤ã«å¤æå¾ãæ ¼ç´ããã¾ãã 2ã¤ç®ã®æ¹æ³ã¯ãæååã§æ¥æã¨æå»ãæå®ããæ¹æ³ã§ãã"å¹´/æ/æ¥ æ:å:ç§"ã¨ãããã©ã¼ãããã§è¨è¿°ãããã¨ã§ããã¼ã¿ãã¼ãã®éã«æååãããã£ã¹ãããããã¤ã¯ãç§æ°ã®å¤ãæ ¼ç´ããã¾ãã .. groonga-command .. table_create --name Users --flags TABLE_HASH_KEY --key_type ShortText table_create --name Comments --flags TABLE_HASH_KEY --key_type ShortText table_create --name HashTags --flags TABLE_HASH_KEY --key_type ShortText table_create --name Bigram --flags TABLE_PAT_KEY|KEY_NORMALIZE --key_type ShortText --default_tokenizer TokenBigram table_create --name GeoIndex --flags TABLE_PAT_KEY --key_type WGS84GeoPoint column_create --table Users --name name --flags COLUMN_SCALAR --type ShortText column_create --table Users --name follower --flags COLUMN_VECTOR --type Users column_create --table Users --name favorites --flags COLUMN_VECTOR --type Comments column_create --table Users --name location --flags COLUMN_SCALAR --type WGS84GeoPoint column_create --table Users --name location_str --flags COLUMN_SCALAR --type ShortText column_create --table Users --name description --flags COLUMN_SCALAR --type ShortText column_create --table Users --name followee --flags COLUMN_INDEX --type Users --source follower column_create --table Comments --name comment --flags COLUMN_SCALAR --type ShortText column_create --table Comments --name last_modified --flags COLUMN_SCALAR --type Time column_create --table Comments --name replied_to --flags COLUMN_SCALAR --type Comments column_create --table Comments --name replied_users --flags COLUMN_VECTOR --type Users column_create --table Comments --name hash_tags --flags COLUMN_VECTOR --type HashTags column_create --table Comments --name location --flags COLUMN_SCALAR --type WGS84GeoPoint column_create --table Comments --name posted_by --flags COLUMN_SCALAR --type Users column_create --table Comments --name favorited_by --flags COLUMN_INDEX --type Users --source favorites column_create --table HashTags --name hash_index --flags COLUMN_INDEX --type Comments --source hash_tags column_create --table Bigram --name users_index --flags COLUMN_INDEX|WITH_POSITION|WITH_SECTION --type Users --source name,location_str,description column_create --table Bigram --name comment_index --flags COLUMN_INDEX|WITH_POSITION --type Comments --source comment column_create --table GeoIndex --name users_location --type Users --flags COLUMN_INDEX --source location column_create --table GeoIndex --name comments_location --type Comments --flags COLUMN_INDEX --source location load --table Users [ { "_key": "daijiro", "name": "hsiomaneki", "follower": ["tasukuchan"], "favorites": [], "location": "127678039x502643091", "location_str": "ç¥å¥å·ç", "description": "groonga developer" }, { "_key": "tasukuchan", "name": "ã°ãã£ã©ãã", "follower": ["daijiro","OffGao"], "favorites": ["daijiro:1","OffGao:1"], "location": "128423343x502929252", "location_str": "æ±äº¬é½æ¸è°·åº", "description": "ã¨ãããã£ãã" }, { "_key": "OffGao", "name": "OffGao", "follower": ["tasukuchan","daijiro"], "favorites": ["tasukuchan:1","daijiro:1"], "location": "128544408x502801502", "location_str": "æ±äº¬é½ä¸éåº", "description": "ãããã" } ] load --table Comments [ { "_key": "daijiro:1", "comment": "ãã¤ã¯ãããã°ä½ã£ã¦ã¿ã¾ããï¼çæ ããã¡ããã¾ããçãªæãã§ï¼ã", "last_modified": "2010/03/17 12:05:00", "posted_by": "daijiro", }, { "_key": "tasukuchan:1", "comment": "åã®æ¸ãè¾¼ã¿ããã¹ããã¹ãã", "last_modified": "2010/03/17 12:00:00", "posted_by": "tasukuchan", }, { "_key": "daijiro:2", "comment": "@tasukuchan ãããã!!!", "last_modified": "2010/03/17 12:05:00", "replied_to": "tasukuchan:1", "replied_users": ["tasukuchan"], "posted_by": "daijiro", }, { "_key": "tasukuchan:2", "comment": "@daijiro ãããã¨ãï¼", "last_modified": "2010/03/17 13:00:00", "replied_to": "daijiro:2", "replied_users": ["daijiro"], "posted_by": "tasukuchan", }, { "_key": "tasukuchan:3", "comment": "groongaãªã #groonga", "last_modified": "2010/03/17 14:00:00", "hash_tags": ["groonga"], "location": "127972422x503117107", "posted_by": "tasukuchan", }, { "_key": "tasukuchan:4", "comment": "groongaéçºå宿ã®ããç¾½ç°ç©ºæ¸¯ã«æ¥ã¾ããï¼ #groonga #travel", "last_modified": "2010/03/17 14:05:00", "hash_tags": ["groonga", "travel"], "location": "127975798x502919856", "posted_by": "tasukuchan", }, { "_key": "OffGao:1", "comment": "@daijiro @tasukuchan ç»é²ãã¦ã¿ã¾ãããã¼ï¼", "last_modified": "2010/03/17 15:00:00", "replied_users": ["daijiro", "tasukuchan"], "location": "128551935x502796433", "posted_by": "OffGao", } { "_key": "OffGao:2", "comment": "ä¸éããã¼ãã¦ã§ã¤ãªããªã", "last_modified": "2010/03/17 15:05:00", "location": "128551935x502796434", "posted_by": "OffGao", } ] æ¤ç´¢ ---- ããã§ã¯ãå®éã«æ¤ç´¢ããã¦ã¿ã¾ãããã ãã¼ã¯ã¼ãã§ã¦ã¼ã¶ã¼æ¤ç´¢ ^^^^^^^^^^^^^^^^^^^^^^^^ ããã§ã¯ã :doc:`match_columns` ã§æ±ã£ããè¤æ°ã«ã©ã ã対象ã¨ããæ¤ç´¢ãè¡ãã¾ãã æå®ãããæååã§ãã¦ã¼ã¶ã¼åã»ç¾å¨å°ã»èªå·±ç´¹ä»æã対象ã«æ¤ç´¢ããã¾ãã .. groonga-command .. include:: ../example/tutorial/micro_blog-1.log .. select --table Users --match_columns name,location_str,description --query æ±äº¬ --output_columns _key,name ãæ±äº¬ãããã¼ã¯ã¼ãã«ã¦ã¼ã¶ã¼æ¤ç´¢ããçµæãæ±äº¬é½ã«ä½ãã§ãããã°ãã£ã©ãããã¨ãOffGaoããããããã¾ããã GeoPointã§ã¦ã¼ã¶ã¼æ¤ç´¢ ^^^^^^^^^^^^^^^^^^^^^^ ããã§ã¯ã :doc:`search` ã§æ±ã£ããGeoPointåã®ã«ã©ã ã§æ¤ç´¢ããã¾ãã 以ä¸ã®ä¾ã§ã¯ãæå®ãããä½ç½®ãã5000m以å ã«ããã¦ã¼ã¶ã¼ãæ¤ç´¢ãã¦ãã¾ãã .. groonga-command .. include:: ../example/tutorial/micro_blog-2.log .. select --table Users --filter 'geo_in_circle(location,"128484216x502919856",5000)' --output_columns _key,name æ°å®¿é§ ãã5km以å ã«ããã§ããã¦ã¼ã¶ã¼ãæ¤ç´¢ããã¨ããããã°ãã£ã©ãããã¨ãOffGaoããããããã¾ããã ããã¦ã¼ã¶ã¼ããã©ãã¼ãã¦ããã¦ã¼ã¶ã¼ã®æ¤ç´¢ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ããã§ã¯ã :doc:`index` ã§æ±ã£ããåç §é¢ä¿ã®éå¼ãããã¾ãã 以ä¸ã®ä¾ã§ã¯ãUsersãã¼ãã«ã®followerã«ã©ã ã«ãããã©ãã¼ãªã¹ããéå¼ããã¾ãã .. groonga-command .. include:: ../example/tutorial/micro_blog-3.log .. select --table Users --query follower:@tasukuchan --output_columns _key,name ãã°ãã£ã©ãããããã©ãã¼ãã¦ãããhsiomanekiãã¨ãOffGaoããããããã¾ããã GeoPointã§ã³ã¡ã³ãæ¤ç´¢ ^^^^^^^^^^^^^^^^^^^^^^ ããç¯å²å ã§æ¸ãããã³ã¡ã³ããæ¤ç´¢ãã¾ãã ã¾ãã :doc:`drilldown` ã§æ±ã£ãããªã«ãã¦ã³ãè¡ãã¾ããæ¤ç´¢çµæãããã·ã¥ã¿ã°ã¨ã¦ã¼ã¶ã¼ã§ããªã«ãã¦ã³ããã¦ã¼ã¶ã¼å¥ã»ããã·ã¥ã¿ã°å¥ã®ã«ã¦ã³ããåºãã¾ãã .. groonga-command .. include:: ../example/tutorial/micro_blog-4.log .. select --table Comments --filter 'geo_in_circle(location,"127975798x502919856",20000)' --output_columns posted_by.name,comment --drilldown hash_tags,posted_by ç¯å²ãåºãæå®ãããããä½ç½®æ å ±ã®ãããã¹ã¦ã®ã³ã¡ã³ããããããã¾ãããããã¦ããããããã³ã¡ã³ãããããªã«ãã¦ã³ãããçµæãè¿ã£ã¦ãã¦ãããããã·ã¥ã¿ã°ã¯ã#groongaãã2ã¤ã«ã#travelãã1ã¤ãæ稿è ã¯ãã°ãã£ã©ããããOffGaoãããããã2件ãã¤ã§ãããã¨ããããã¾ãã ãã¼ã¯ã¼ãã§ã³ã¡ã³ãæ¤ç´¢ ^^^^^^^^^^^^^^^^^^^^^^^^ ãããã¼ã¯ã¼ããå«ãã³ã¡ã³ããæ¤ç´¢ãã¾ãã ããã«ã :doc:`search` ã§æ±ã£ããã¹ã³ã¢å¤_scoreãåºãã¦ã¿ã¾ãããã .. groonga-command .. include:: ../example/tutorial/micro_blog-5.log .. select --table Comments --query comment:@ãªã --output_columns comment,_score ããªããããã¼ã¯ã¼ãã«ã³ã¡ã³ãæ¤ç´¢ããçµæã2件ã®ã³ã¡ã³ããããããã¾ãããã¾ãã_scoreã®å¤ãè¿ã£ã¦ãã¦ãããããªããã®æ°ãåºåããã¦ãããã¨ã確èªã§ãã¾ãã GeoPointã¨ãã¼ã¯ã¼ãã§ã³ã¡ã³ãæ¤ç´¢ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ä»åº¦ã¯ããã¼ã¯ã¼ãã¨GeoPointã®ä¸¡æ¹ãæ¡ä»¶ã«æ¤ç´¢ããã¦ã¿ã¾ãã--queryã¨--filterã®ä¸¡æ¹ã使ç¨ããå ´åã両æ¹ã®æ¡ä»¶ã«ä¸è´ããã¬ã³ã¼ããããããã¾ãã .. groonga-command .. include:: ../example/tutorial/micro_blog-6.log .. select --table Comments --query comment:@ç¾½ç° --filter 'geo_in_circle(location,"127975798x502919856",20000)' --output_columns posted_by.name,comment --drilldown hash_tags,posted_by 両æ¹ã®æ¡ä»¶ãæºããã³ã¡ã³ãã1件ããããã¾ãããã¾ããããªã«ãã¦ã³ã®çµæãè¿ã£ã¦ãã¦ããããã°ãã£ã©ãããã®ã³ã¡ã³ã1件ã§ãããã¨ããããã¾ãã ããã·ã¥ã¿ã°ã§ã³ã¡ã³ãæ¤ç´¢ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ããããã·ã¥ã¿ã°ã®ã¤ãã¦ããã³ã¡ã³ããæ¤ç´¢ãã¾ãã ãããã :doc:`index` ã§æ±ã£ããåç §é¢ä¿ã®éå¼ãã使ãã¾ãã .. groonga-command .. include:: ../example/tutorial/micro_blog-7.log .. select --table Comments --query hash_tags:@groonga --output_columns posted_by.name,comment --drilldown posted_by #groongaã¿ã°ã®ä»ãã¦ãã2件ã®ã³ã¡ã³ããããããã¾ãããã¾ããæ稿è ã®ããªã«ãã¦ã³ãè¿ã£ã¦ãã¦ããã2件ã¨ããã°ãã£ã©ãããã®ãã®ã§ãããã¨ããããã¾ãã ã¦ã¼ã¶ã¼IDã§ã³ã¡ã³ãæ¤ç´¢ ^^^^^^^^^^^^^^^^^^^^^^^^ ããã¦ã¼ã¶ã¼ãæ稿ããã³ã¡ã³ããæ¤ç´¢ãã¾ãã .. groonga-command .. include:: ../example/tutorial/micro_blog-8.log .. select --table Comments --query posted_by:tasukuchan --output_columns comment --drilldown hash_tags ãã°ãã£ã©ããããæ¸ãè¾¼ãã 4件ã®ã³ã¡ã³ããããããã¾ãããã¾ããããã·ã¥ã¿ã°ã§ããªã«ãã¦ã³ããçµæãè¿ã£ã¦ãã¦ãããããã·ã¥ã¿ã°ã¯ã#groongaãã2ã¤ã«ã#travelãã1ã¤ãããã¨ããããã¾ãã ã¦ã¼ã¶ã¼ã®ãæ°ã«å ¥ãã³ã¡ã³ããæ¤ç´¢ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ããã¦ã¼ã¶ã¼ããæ°ã«å ¥ãã«å ¥ãã¦ããã³ã¡ã³ããæ¤ç´¢ãã¾ãã .. groonga-command .. include:: ../example/tutorial/micro_blog-9.log .. select --table Users --query _key:tasukuchan --output_columns favorites.posted_by,favorites.comment ãã°ãã£ã©ãããããæ°ã«å ¥ãã«å ¥ãã¦ãã2件ã®ã³ã¡ã³ããããããã¾ããã æ稿æéã§ã³ã¡ã³ãæ¤ç´¢ ^^^^^^^^^^^^^^^^^^^^^^ ã³ã¡ã³ãã®æ稿æéã§æ¤ç´¢ããã¾ããTimeåã«ã¤ãã¦ã¯ :doc:`data` ã§æ±ã£ã¦ãã¾ãã ãã®ä¾ã§ã¯ãæå®ããæéãããåã«æ稿ããã¦ããã³ã¡ã³ããæ¤ç´¢ãã¾ãã .. groonga-command .. include:: ../example/tutorial/micro_blog-10.log .. select Comments --filter 'last_modified<=1268802000' --output_columns posted_by.name,comment,last_modified --drilldown hash_tags,posted_by 2010/03/17 14:00:00以åã«æ¸ãããã³ã¡ã³ã5件ãããããã¾ãããã¾ããããªã«ãã¦ã³ã®çµæãè¿ã£ã¦ãã¦ããããhsiomanekiãã2件ããã°ãã£ã©ãããã3件ããããã¦ãããã¨ããããã¾ãã .. TODO: 以ä¸ã®æ©è½ã¯groongaæ¬ä½ã§ã®æ¯æ´ãå¿ è¦ã .. ã¿ã¤ã ã©ã¤ã³è¡¨ç¤º: ããã¦ã¼ã¶ãfollowãã¦ããã¦ã¼ã¶ã®çºè¨ããæç³»åé ã®éé ã§ä¸¦ã¹ã¦10件ã®ã¿è¡¨ç¤ºã .. è¤æ°ã®æ¡ä»¶ã§ã®æ¤ç´¢: favoriteã®æ°ãn以ä¸ã®çºè¨ã§å ¨ææ¤ç´¢ãããã«ã¦ã¼ã¶ã§ããªã«ãã¦ã³