| 1 |
table_create Docs TABLE_NO_KEY |
| 2 |
column_create Docs title COLUMN_SCALAR ShortText |
| 3 |
column_create Docs body COLUMN_SCALAR Text |
| 4 |
|
| 5 |
load --table Docs --columns 'title,body' |
| 6 |
[ |
| 7 |
["Groonga overview","Full text search engine."], |
| 8 |
["Groonga indexes","Groonga uses inverted ind."], |
| 9 |
["Conclusion","Groonga is good."] |
| 10 |
] |
| 11 |
|
| 12 |
table_create Idx TABLE_PAT_KEY ShortText \ |
| 13 |
--default_tokenizer TokenBigram \ |
| 14 |
--normalizer NormalizerAuto |
| 15 |
column_create Idx title COLUMN_INDEX|WITH_POSITION Docs title |
| 16 |
column_create Idx body COLUMN_INDEX|WITH_POSITION Docs body |
| 17 |
|
| 18 |
select \ |
| 19 |
--table Docs \ |
| 20 |
--match_columns 'title||body' \ |
| 21 |
--query 'Groo*' \ |
| 22 |
--output_columns '_id,_score' \ |
| 23 |
--match_escalation_threshold -1 |
| 24 |
|
| 25 |
select \ |
| 26 |
--table Docs \ |
| 27 |
--match_columns 'body||title' \ |
| 28 |
--query 'Groo*' \ |
| 29 |
--output_columns '_id,_score' \ |
| 30 |
--match_escalation_threshold -1 |