From: Adam Dickmeiss Date: Thu, 12 Nov 2015 13:00:21 +0000 (+0100) Subject: Allow @attr 2=102 for numeric index X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=c5971ebf8a88865ed9a1f7c8cf9daa22544f07be;p=idzebra-moved-to-github.git Allow @attr 2=102 for numeric index --- diff --git a/index/rpnsearch.c b/index/rpnsearch.c index f11dcd8..47c1c23 100644 --- a/index/rpnsearch.c +++ b/index/rpnsearch.c @@ -1800,6 +1800,7 @@ static int numeric_relation(ZebraHandle zh, Z_AttributesPlusTerm *zapt, gen_regular_rel(term_dict, term_value+1, 0); break; case -1: + case 102: case 3: yaz_log(log_level_rpn, "Relation ="); if (!term_100(zm, term_sub, term_num, 1, display_term)) diff --git a/test/api/test_search.c b/test/api/test_search.c index 377d6e7..a560e15 100644 --- a/test/api/test_search.c +++ b/test/api/test_search.c @@ -418,6 +418,9 @@ static void tst(int argc, char **argv) /* N=41 and N=49 get only rec2 */ YAZ_CHECK(tl_query(zh, "@attr 2=3 @attr gils 1=2040 @attr 4=109 \"41 49\" ", 1)); + /* N=41 and N=49, but relevance */ + YAZ_CHECK(tl_query(zh, "@attr 2=102 @attr gils 1=2040 @attr 4=109 \"41 49\" ", 1)); + /* = */ YAZ_CHECK(tl_query(zh, "@attr 1=30 @attr 4=5 @attr 2=3 {2107-09-19 00:00:00}", 1));