[groonga-dev,04530] pgroonga で jsonb におけるクエリー

Back to archive index

内山敏郎 toshio_uchiy****@mirro*****
2017年 11月 16日 (木) 11:46:43 JST


ML の皆様、お世話になります。

内山と申します。

 

 早速、PGroonga での質問ですが、

 

create table subtitlej ( record jsonb );

 

で作ったテーブルに’

 

Insert into subtitlej values (‘{

                         “id”: “1”.

                         “subtitle”: [

                               {“time”: “10”,

                                “content”: “あかさたな”

                               },

                               {“time”: “20”,

                               “content”: “いきしちに”

                              }

                        }’);

 

のようにデータを入れ、

 

create index subtitlej_pgroonga_idx on subtitlej using pgroonga ( record );

 

でインデックスを付けた場合、

 

select record from subtitlej where record &@  ‘あかさ’;

 

で検索できることは分かりました。

 

select jsonb_pretty(record) from subtitlej where record @> '{"subtitle":
[{"content": "あかさ"}]}'::jsonb;

 

のような検索はできますでしょうか。

 ご教示、よろしくお願いします。

-------------- next part --------------
HTMLの添付ファイルを保管しました...
URL: https://lists.osdn.me/mailman/archives/groonga-dev/attachments/20171116/a6ce1aa0/attachment.htm 



groonga-dev メーリングリストの案内
Back to archive index