table_create Comments TABLE_HASH_KEY UInt32 [[0,0.0,0.0],true] column_create Comments content COLUMN_SCALAR ShortText [[0,0.0,0.0],true] table_create Articles TABLE_NO_KEY [[0,0.0,0.0],true] column_create Articles content COLUMN_SCALAR Text [[0,0.0,0.0],true] column_create Articles comments COLUMN_VECTOR Comments [[0,0.0,0.0],true] table_create Lexicon TABLE_PAT_KEY|KEY_NORMALIZE ShortText --default_tokenizer TokenBigram [[0,0.0,0.0],true] column_create Lexicon articles_content COLUMN_INDEX|WITH_POSITION Articles content [[0,0.0,0.0],true] column_create Lexicon comments_content COLUMN_INDEX|WITH_POSITION Comments content [[0,0.0,0.0],true] column_create Comments article COLUMN_INDEX Articles comments [[0,0.0,0.0],true] 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,0.0,0.0],3] load --table Articles [ {"content": "Groonga is fast!", "comments": [1, 3]}, {"content": "Groonga is useful!"}, {"content": "Mroonga is fast!", "comments": [2]} ] [[0,0.0,0.0],3] select Articles --match_columns comments.content --query groonga --output_columns "_id, _score, *" [ [ 0, 0.0, 0.0 ], [ [ [ 2 ], [ [ "_id", "UInt32" ], [ "_score", "Int32" ], [ "comments", "Comments" ], [ "content", "Text" ] ], [ 1, 1, [ 1, 3 ], "Groonga is fast!" ], [ 3, 1, [ 2 ], "Mroonga is fast!" ] ] ] ]