X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fcclfind.c;h=f7903fe387ef7736684c84a1c8167449bbfe20e2;hp=51f06c444c755dd0e506cafca1f2439093ea4929;hb=3e9991341defe84826dbb663400c2b434ef03641;hpb=7e12528ec54fa937612c94a936f02872d9a6ca5c diff --git a/src/cclfind.c b/src/cclfind.c index 51f06c4..f7903fe 100644 --- a/src/cclfind.c +++ b/src/cclfind.c @@ -462,13 +462,11 @@ static struct ccl_rpn_node *search_term_x(CCL_parser cclp, } } } - /* len now holds the number of characters in the RPN term */ - /* no holds the number of CCL tokens (1 or more) */ - - if (structure_value == -1 && - qual_val_type(qa, CCL_BIB1_STR, CCL_BIB1_STR_WP, &attset)) - { /* no structure attribute met. Apply either structure attribute - WORD or PHRASE depending on number of CCL tokens */ + if (structure_value == -1 && ( + auto_group || + qual_val_type(qa, CCL_BIB1_STR, CCL_BIB1_STR_WP, &attset)) + ) + { if (!is_phrase) ccl_add_attr_numeric(p, attset, CCL_BIB1_STR, 2); else