| 1 |
table_create Entries TABLE_NO_KEY |
| 2 |
[[0,0.0,0.0],true] |
| 3 |
column_create Entries title COLUMN_SCALAR ShortText |
| 4 |
[[0,0.0,0.0],true] |
| 5 |
column_create Entries body COLUMN_SCALAR ShortText |
| 6 |
[[0,0.0,0.0],true] |
| 7 |
table_create Terms TABLE_HASH_KEY ShortText --default_tokenizer 'TokenNgram("report_source_location", true)' --normalizer 'NormalizerNFKC100' |
| 8 |
[[0,0.0,0.0],true] |
| 9 |
column_create Terms document_index COLUMN_INDEX|WITH_POSITION Entries body |
| 10 |
[[0,0.0,0.0],true] |
| 11 |
load --table Entries |
| 12 |
[ |
| 13 |
{"title": "タイトル", "body": "あ"} |
| 14 |
] |
| 15 |
[[0,0.0,0.0],1] |
| 16 |
select Entries --match_columns body --query 'あ' --output_columns 'highlight_html(title, Terms), highlight_html(body, Terms)' |
| 17 |
[ |
| 18 |
[ |
| 19 |
0, |
| 20 |
0.0, |
| 21 |
0.0 |
| 22 |
], |
| 23 |
[ |
| 24 |
[ |
| 25 |
[ |
| 26 |
1 |
| 27 |
], |
| 28 |
[ |
| 29 |
[ |
| 30 |
"highlight_html", |
| 31 |
null |
| 32 |
], |
| 33 |
[ |
| 34 |
"highlight_html", |
| 35 |
null |
| 36 |
] |
| 37 |
], |
| 38 |
[ |
| 39 |
"タイトル", |
| 40 |
"<span class=\"keyword\">あ</span>" |
| 41 |
] |
| 42 |
] |
| 43 |
] |
| 44 |
] |