Kouhei Sutou 2018-10-25 20:44:58 +0900 (Thu, 25 Oct 2018) Revision: f0076f9ad402b63c2b6c19441c63e57cb818beb5 https://github.com/groonga/groonga/commit/f0076f9ad402b63c2b6c19441c63e57cb818beb5 Message: Support normalizer options in sequential match with "record @ 'query'" Added files: test/command/suite/select/filter/no_index/reference/match/text_normalizer.expected test/command/suite/select/filter/no_index/reference/match/text_normalizer.test Modified files: lib/operator.c Modified: lib/operator.c (+1 -1) =================================================================== --- lib/operator.c 2018-10-25 20:30:17 +0900 (2f64103bd) +++ lib/operator.c 2018-10-25 20:44:58 +0900 (72369d260) @@ -1187,7 +1187,7 @@ exec_text_operator_record_text(grn_ctx *ctx, norm_query = grn_string_open(ctx, GRN_TEXT_VALUE(query), GRN_TEXT_LEN(query), - normalizer, + table, 0); grn_string_get_normalized(ctx, norm_query, &norm_query_raw, Added: test/command/suite/select/filter/no_index/reference/match/text_normalizer.expected (+52 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/filter/no_index/reference/match/text_normalizer.expected 2018-10-25 20:44:58 +0900 (f84aedeb6) @@ -0,0 +1,52 @@ +table_create Readings TABLE_HASH_KEY ShortText --normalizer 'NormalizerNFKC100("unify_kana", true)' +[[0,0.0,0.0],true] +table_create Items TABLE_HASH_KEY ShortText +[[0,0.0,0.0],true] +column_create Items reading COLUMN_SCALAR Readings +[[0,0.0,0.0],true] +load --table Items +[ +{"_key": "林檎", "reading": "りんご"}, +{"_key": "リンゴ", "reading": "リンゴ"}, +{"_key": "なし", "reading": "なし"} +] +[[0,0.0,0.0],3] +select Items --filter 'reading @ "リンゴ"' +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + 2 + ], + [ + [ + "_id", + "UInt32" + ], + [ + "_key", + "ShortText" + ], + [ + "reading", + "Readings" + ] + ], + [ + 1, + "林檎", + "りんご" + ], + [ + 2, + "リンゴ", + "りんご" + ] + ] + ] +] Added: test/command/suite/select/filter/no_index/reference/match/text_normalizer.test (+14 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/filter/no_index/reference/match/text_normalizer.test 2018-10-25 20:44:58 +0900 (100cc793f) @@ -0,0 +1,14 @@ +table_create Readings TABLE_HASH_KEY ShortText \ + --normalizer 'NormalizerNFKC100("unify_kana", true)' + +table_create Items TABLE_HASH_KEY ShortText +column_create Items reading COLUMN_SCALAR Readings + +load --table Items +[ +{"_key": "林檎", "reading": "りんご"}, +{"_key": "リンゴ", "reading": "リンゴ"}, +{"_key": "なし", "reading": "なし"} +] + +select Items --filter 'reading @ "リンゴ"' -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20181025/546e83ac/attachment-0001.html>