Kouhei Sutou
null+****@clear*****
Thu Feb 6 16:28:16 JST 2014
Kouhei Sutou 2014-02-06 16:28:16 +0900 (Thu, 06 Feb 2014) New Revision: 307b85a9fe019b07d1ebde89a7567fcf847e9ea3 https://github.com/droonga/fluent-plugin-droonga/commit/307b85a9fe019b07d1ebde89a7567fcf847e9ea3 Message: Add sample data for trying MeCab filter Added files: sample/mecab_filter/data.grn sample/mecab_filter/ddl.grn sample/mecab_filter/search_with_mecab_filter.json sample/mecab_filter/search_without_mecab_filter.json Added: sample/mecab_filter/data.grn (+7 -0) 100644 =================================================================== --- /dev/null +++ sample/mecab_filter/data.grn 2014-02-06 16:28:16 +0900 (7055dfa) @@ -0,0 +1,7 @@ +load --table Memo +[ +{"_key": "1", "content": "アンパサンド"}, +{"_key": "2", "content": "ジャパン"}, +{"_key": "3", "content": "食パン"}, +{"_key": "4", "content": "フランスのパン"} +] Added: sample/mecab_filter/ddl.grn (+7 -0) 100644 =================================================================== --- /dev/null +++ sample/mecab_filter/ddl.grn 2014-02-06 16:28:16 +0900 (466673d) @@ -0,0 +1,7 @@ +table_create Memo TABLE_HASH_KEY ShortText +column_create Memo content COLUMN_SCALAR ShortText + +table_create Terms TABLE_PAT_KEY ShortText \ + --default_tokenizer TokenBigram \ + --normalizer NormalizerAuto +column_create Terms memo_context COLUMN_INDEX|WITH_POSITION Memo content Added: sample/mecab_filter/search_with_mecab_filter.json (+21 -0) 100644 =================================================================== --- /dev/null +++ sample/mecab_filter/search_with_mecab_filter.json 2014-02-06 16:28:16 +0900 (456b16b) @@ -0,0 +1,21 @@ +{ + "type": "search", + "dataset": "Droonga", + "body": { + "queries": { + "search": { + "source": "Memo", + "condition": { + "matchTo": ["content"], + "query": "パン", + "useMeCabFilter": true + }, + "output": { + "elements": ["count", "records"], + "attributes": ["_key", "content"], + "limit": 10 + } + } + } + } +} Added: sample/mecab_filter/search_without_mecab_filter.json (+21 -0) 100644 =================================================================== --- /dev/null +++ sample/mecab_filter/search_without_mecab_filter.json 2014-02-06 16:28:16 +0900 (21a66aa) @@ -0,0 +1,21 @@ +{ + "type": "search", + "dataset": "Droonga", + "body": { + "queries": { + "search": { + "source": "Memo", + "condition": { + "matchTo": ["content"], + "query": "パン", + "useMeCabFilter": false + }, + "output": { + "elements": ["count", "records"], + "attributes": ["_key", "content"], + "limit": 10 + } + } + } + } +} -------------- next part -------------- HTML����������������������������... 下載