| 1 |
table_create Memos TABLE_NO_KEY |
| 2 |
[[0,0.0,0.0],true] |
| 3 |
column_create Memos content COLUMN_SCALAR ShortText |
| 4 |
[[0,0.0,0.0],true] |
| 5 |
table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram |
| 6 |
[[0,0.0,0.0],true] |
| 7 |
column_create Terms memo_content COLUMN_INDEX|WITH_POSITION Memos content |
| 8 |
[[0,0.0,0.0],true] |
| 9 |
load --table Memos |
| 10 |
[ |
| 11 |
["content"], |
| 12 |
["resume"], |
| 13 |
["レジュメ"] |
| 14 |
] |
| 15 |
[[0,0.0,0.0],2] |
| 16 |
table_create SudachiDictionary TABLE_PAT_KEY ShortText --normalizer NormalizerNFKC130 |
| 17 |
[[0,0.0,0.0],true] |
| 18 |
column_create SudachiDictionary synonyms COLUMN_VECTOR ShortText |
| 19 |
[[0,0.0,0.0],true] |
| 20 |
select --table Memos --query_expander SudachiDictionary.synonyms --match_columns content --query レジュメ --output_columns content,_score --command_version 3 |
| 21 |
{ |
| 22 |
"header": { |
| 23 |
"return_code": 0, |
| 24 |
"start_time": 0.0, |
| 25 |
"elapsed_time": 0.0 |
| 26 |
}, |
| 27 |
"body": { |
| 28 |
"n_hits": 2, |
| 29 |
"columns": [ |
| 30 |
{ |
| 31 |
"name": "content", |
| 32 |
"type": "ShortText" |
| 33 |
}, |
| 34 |
{ |
| 35 |
"name": "_score", |
| 36 |
"type": "Float" |
| 37 |
} |
| 38 |
], |
| 39 |
"records": [ |
| 40 |
[ |
| 41 |
"レジュメ", |
| 42 |
1.0 |
| 43 |
], |
| 44 |
[ |
| 45 |
"resume", |
| 46 |
0.800000011920929 |
| 47 |
] |
| 48 |
] |
| 49 |
} |
| 50 |
} |