Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| table_create Tags TABLE_PAT_KEY ShortText | ||
| [[0,0.0,0.0],true] | ||
| table_create Memos TABLE_HASH_KEY ShortText | ||
| [[0,0.0,0.0],true] | ||
| column_create Memos tags COLUMN_INDEX|WITH_WEIGHT Tags | ||
| [[0,0.0,0.0],true] | ||
| load --table Memos | ||
| [ | ||
| { | ||
| "_key": "Groonga is fast", | ||
| "tags": { | ||
| "groonga": 100 | ||
| } | ||
| }, | ||
| { | ||
| "_key": "Mroonga is also fast", | ||
| "tags": { | ||
| "mroonga": 100, | ||
| "groonga": 10 | ||
| } | ||
| }, | ||
| { | ||
| "_key": "Ruby is an object oriented script language", | ||
| "tags": { | ||
| "ruby": 100 | ||
| } | ||
| } | ||
| ] | ||
| [[0,0.0,0.0],3] | ||
| select Memos --filter true --adjuster 'tags @ "groonga" + tags @ "mroonga"' --output_columns _key,_score | ||
| [ | ||
| [ | ||
| 0, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| [ | ||
| [ | ||
| [ | ||
| 3 | ||
| ], | ||
| [ | ||
| [ | ||
| "_key", | ||
| "ShortText" | ||
| ], | ||
| [ | ||
| "_score", | ||
| "Int32" | ||
| ] | ||
| ], | ||
| [ | ||
| "Groonga is fast", | ||
| 101 | ||
| ], | ||
| [ | ||
| "Mroonga is also fast", | ||
| 111 | ||
| ], | ||
| [ | ||
| "Ruby is an object oriented script language", | ||
| 1 | ||
| ] | ||
| ] | ||
| ] | ||
| ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| table_create Tags TABLE_PAT_KEY ShortText | ||
|
|
||
| table_create Memos TABLE_HASH_KEY ShortText | ||
| column_create Memos tags COLUMN_INDEX|WITH_WEIGHT Tags | ||
|
|
||
| load --table Memos | ||
| [ | ||
| { | ||
| "_key": "Groonga is fast", | ||
| "tags": { | ||
| "groonga": 100 | ||
| } | ||
| }, | ||
| { | ||
| "_key": "Mroonga is also fast", | ||
| "tags": { | ||
| "mroonga": 100, | ||
| "groonga": 10 | ||
| } | ||
| }, | ||
| { | ||
| "_key": "Ruby is an object oriented script language", | ||
| "tags": { | ||
| "ruby": 100 | ||
| } | ||
| } | ||
| ] | ||
|
|
||
| select Memos \ | ||
| --filter true \ | ||
| --adjuster 'tags @ "groonga" + tags @ "mroonga"' \ | ||
| --output_columns _key,_score |