From c5971ebf8a88865ed9a1f7c8cf9daa22544f07be Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 12 Nov 2015 14:00:21 +0100 Subject: [PATCH] Allow @attr 2=102 for numeric index --- index/rpnsearch.c | 1 + test/api/test_search.c | 3 +++ 2 files changed, 4 insertions(+) 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)); -- 1.7.10.4