From: Dennis Schafroth Date: Wed, 11 Sep 2013 08:50:24 +0000 (+0200) Subject: Fix check on same index. Convert reversed into ranges as well X-Git-Tag: v4.2.66~4 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=744a00b201a04b308f22fad1ece422b97d2cdd50;p=yaz-moved-to-github.git Fix check on same index. Convert reversed into ranges as well --- diff --git a/src/rpn2solr.c b/src/rpn2solr.c index 6e41001..076e3a9 100644 --- a/src/rpn2solr.c +++ b/src/rpn2solr.c @@ -351,10 +351,12 @@ static int solr_write_and_or_range(void (*pr)(const char *buf, void *client_data { if (solr_attr_left->is_range && solr_attr_right->is_range && - !strcmp(solr_attr_left->index, solr_attr_left->index)) + !strcmp(solr_attr_left->index, solr_attr_right->index)) { if (solr_attr_left->is_range >= 3 && solr_attr_right->is_range <= 2) 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) + return solr_write_range(pr, client_data, solr_attr_right, solr_attr_left); } solr_write_structure(pr, client_data, solr_attr_left); pr(" AND ", client_data);