From 07ea788eea17257bcfa367f81d88d89ac88d9e1f Mon Sep 17 00:00:00 2001 From: zhengchao Date: Wed, 28 Jun 2017 09:51:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E5=A4=84=E7=90=86MAAT=E7=BB=84?= =?UTF-8?q?=E5=90=88=E6=89=AB=E6=8F=8F=E4=B8=AD=E6=9C=80=E5=90=8E=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E5=9F=9F=E6=97=B6=EF=BC=8C=E5=BF=85=E9=A1=BB=E4=B9=8B?= =?UTF-8?q?=E5=89=8D=E6=B2=A1=E6=9C=89=E4=BB=BB=E4=BD=95=E5=88=86=E7=BB=84?= =?UTF-8?q?=E5=91=BD=E4=B8=AD=EF=BC=8C=E6=89=8D=E8=83=BD=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E5=BF=AB=E9=80=9F=E8=B7=AF=E5=BE=84=E3=80=82=E4=B8=8A=E4=B8=80?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=AD=98=E5=9C=A8=E6=BC=8F=E6=8A=A5=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entry/Maat_api.cpp | 7 ++++--- src/entry/Maat_rule.cpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/entry/Maat_api.cpp b/src/entry/Maat_api.cpp index 4587cd8..0e10c92 100644 --- a/src/entry/Maat_api.cpp +++ b/src/entry/Maat_api.cpp @@ -123,7 +123,7 @@ int region_compile(_Maat_feather_t*feather,struct _INNER_scan_status_t *_mid,int array_mi_rule[shortcut_avilable_cnt]=(struct _Maat_compile_rule_t*)(group_rule->compile_shortcut); shortcut_avilable_cnt++; } - _mid->cur_hit_id[_mid->cur_hit_cnt]=(int)group_rule->group_id; + _mid->cur_hit_id[_mid->cur_hit_cnt]=group_rule->group_id; _mid->cur_hit_cnt++; ret=insert_set_id(&(_mid->hitted_group_id), &(_mid->hit_group_size), @@ -137,10 +137,11 @@ int region_compile(_Maat_feather_t*feather,struct _INNER_scan_status_t *_mid,int scan_ret=shortcut_avilable_cnt; aligment_int64_array_add(feather->orphan_group_saving, thread_num, 1); } - else if(shortcut_avilable_cnt==0&®ion_hit_num==1&&is_last_region==1) + else if(shortcut_avilable_cnt==0&®ion_hit_num==1&&_mid->hit_group_cnt==1&&is_last_region==1) { //short cut for last scan and combination rules - //One groups may belong to a statisfy a compile rule, so only region_hit_num=1 could use the short cut + //region_hit_num==1 : for current scan hitted rules, one and each other group may statisfy a compile rule. + //_mid->hit_group_cnt==1: With pre scan hitted group rules, one group may staisfy a compile rule scan_ret=0; aligment_int64_array_add(feather->last_region_saving, thread_num, 1); } diff --git a/src/entry/Maat_rule.cpp b/src/entry/Maat_rule.cpp index 3e7396a..3caecac 100644 --- a/src/entry/Maat_rule.cpp +++ b/src/entry/Maat_rule.cpp @@ -28,7 +28,7 @@ #include "mesa_fuzzy.h" #include "great_index_engine.h" -int MAAT_FRAME_VERSION_1_9_20170624=1; +int MAAT_FRAME_VERSION_1_9_20170626=1; const char *maat_module="MAAT Frame"; const char* CHARSET_STRING[]={"NONE","gbk","big5","unicode","utf8","bin",