From 3177bd5bc45eb8d42f0c6ffd3dbe97c1c0f4054f Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Wed, 11 Sep 2013 11:14:50 +0200 Subject: [PATCH] Using bib1 attribute values for relations --- src/rpn2solr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rpn2solr.c b/src/rpn2solr.c index 076e3a9..221e64b 100644 --- a/src/rpn2solr.c +++ b/src/rpn2solr.c @@ -159,12 +159,12 @@ static int rpn2solr_attr(solr_transform_t ct, solr_attr->close = "]"; } else if (!strcmp(relation, "ge")) { - solr_attr->is_range = 3; + solr_attr->is_range = 4; solr_attr->begin = "["; solr_attr->close = " TO *]"; } else if (!strcmp(relation, ">")) { - solr_attr->is_range = 4; + solr_attr->is_range = 5; solr_attr->begin = "{"; solr_attr->close = " TO *]"; } @@ -353,9 +353,9 @@ static int solr_write_and_or_range(void (*pr)(const char *buf, void *client_data solr_attr_right->is_range && !strcmp(solr_attr_left->index, solr_attr_right->index)) { - if (solr_attr_left->is_range >= 3 && solr_attr_right->is_range <= 2) + if (solr_attr_left->is_range > 3 && solr_attr_right->is_range < 3) return solr_write_range(pr, client_data, solr_attr_left, solr_attr_right); - else if (solr_attr_left->is_range <= 2 && solr_attr_right->is_range >= 2) + else if (solr_attr_left->is_range < 3 && solr_attr_right->is_range > 3) return solr_write_range(pr, client_data, solr_attr_right, solr_attr_left); } solr_write_structure(pr, client_data, solr_attr_left); -- 1.7.10.4