CCL: fix regression introduced in YAZ-781
authorAdam Dickmeiss <adam@indexdata.dk>
Sat, 6 Jun 2015 17:34:47 +0000 (19:34 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Sat, 6 Jun 2015 17:34:47 +0000 (19:34 +0200)
src/cclfind.c
test/test_ccl.c

index 2c8c9fa..c03bdd3 100644 (file)
@@ -723,7 +723,7 @@ static struct ccl_rpn_node *search_term_x(CCL_parser cclp,
             struct ccl_rpn_attr *attr;
 
             for (attr = ccl_qual_get_attr(qa[i]); attr; attr = attr->next)
-                if (attr->type == 1)
+                if (attr->type == 1 && i == 0)
                 {
                     struct ccl_rpn_node *tmp2;
                     tmp2 = ccl_term_one_use(cclp, cclp->look_token,
index e614a5b..3881b4b 100644 (file)
@@ -272,8 +272,7 @@ void tst1(int pass)
                             "@prox 0 1 0 2 k 2 "
                             "@attr 4=2 @attr 1=1016 a "
                             "@or @attr 4=2 @attr 1=1016 b "
-                            "@or @attr 4=2 @attr 1=/my/title c "
-                            "@attr 4=2 @attr 1=1016 c "
+                            "@attr 4=2 @attr 1=/my/title c "
     ));
 
     YAZ_CHECK(tst_ccl_query(bibset, "(a b) % (c)",