Naoya Murakami
null+****@clear*****
Fri Jul 15 17:48:03 JST 2016
Naoya Murakami 2016-07-15 17:48:03 +0900 (Fri, 15 Jul 2016) New Revision: eff7c8e69eb3589b0c538c4974646c788c57617d https://github.com/groonga/groonga/commit/eff7c8e69eb3589b0c538c4974646c788c57617d Merged c2cabcc: Merge pull request #585 from naoa/fix-bug-object-literal Message: Fix a bug object literal expression codes is broken fix #584 Added files: test/command/suite/select/function/fuzzy_search/with_logical_operation.expected test/command/suite/select/function/fuzzy_search/with_logical_operation.test Modified files: lib/grn_ecmascript.lemon Modified: lib/grn_ecmascript.lemon (+1 -0) =================================================================== --- lib/grn_ecmascript.lemon 2016-07-14 14:30:56 +0900 (161e0ca) +++ lib/grn_ecmascript.lemon 2016-07-15 17:48:03 +0900 (60ae202) @@ -431,6 +431,7 @@ property_name_and_value ::= property_name COLON assignment_expression. { if (added) { GRN_OBJ_INIT(buf, value->header.type, 0, value->header.domain); GRN_TEXT_PUT(ctx, buf, GRN_TEXT_VALUE(value), GRN_TEXT_LEN(value)); + grn_expr_dfi_pop(e); e->codes_curr -= 3; } else { ERR(GRN_INVALID_ARGUMENT, Added: test/command/suite/select/function/fuzzy_search/with_logical_operation.expected (+49 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/function/fuzzy_search/with_logical_operation.expected 2016-07-15 17:48:03 +0900 (25a6467) @@ -0,0 +1,49 @@ +table_create Users TABLE_NO_KEY +[[0,0.0,0.0],true] +column_create Users name COLUMN_SCALAR ShortText +[[0,0.0,0.0],true] +table_create Tags TABLE_PAT_KEY ShortText +[[0,0.0,0.0],true] +column_create Tags tag COLUMN_INDEX Users name +[[0,0.0,0.0],true] +load --table Users +[ +{"name": "Tom"}, +{"name": "Tomy"}, +{"name": "Tomas"}, +{"name": "Pom"} +] +[[0,0.0,0.0],4] +select Tags --filter '_key @^ "T" && fuzzy_search(_key, "To", {"max_distance": 2})' --output_columns '_key, _score' +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + 2 + ], + [ + [ + "_key", + "ShortText" + ], + [ + "_score", + "Int32" + ] + ], + [ + "Tomy", + 2 + ], + [ + "Tom", + 3 + ] + ] + ] +] Added: test/command/suite/select/function/fuzzy_search/with_logical_operation.test (+16 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/function/fuzzy_search/with_logical_operation.test 2016-07-15 17:48:03 +0900 (22ae031) @@ -0,0 +1,16 @@ +table_create Users TABLE_NO_KEY +column_create Users name COLUMN_SCALAR ShortText + +table_create Tags TABLE_PAT_KEY ShortText +column_create Tags tag COLUMN_INDEX Users name + +load --table Users +[ +{"name": "Tom"}, +{"name": "Tomy"}, +{"name": "Tomas"}, +{"name": "Pom"} +] + +select Tags --filter '_key @^ "T" && fuzzy_search(_key, "To", {"max_distance": 2})' \ + --output_columns '_key, _score' -------------- next part -------------- HTML����������������������������...Download