X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fcclfind.c;h=12dca7923a32a0fdb69bd6f36d82fdc96640f8b2;hb=6725546edd736d234e34c8878bdd1fad85be8ee1;hp=51f06c444c755dd0e506cafca1f2439093ea4929;hpb=818a9b6c9a5dfae6176d350346da0a9c55a393d6;p=yaz-moved-to-github.git diff --git a/src/cclfind.c b/src/cclfind.c index 51f06c4..12dca79 100644 --- a/src/cclfind.c +++ b/src/cclfind.c @@ -462,13 +462,12 @@ 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 */ + attset = 0; + 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