X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Frpn2solr.c;h=70b2f6c642a4054a9b52d10b58070d01a032122b;hb=4a7e5fa76ce41e82c7e028aea763bcf63cd0237b;hp=11abe87ade8848da3934f58d09371d29f9679f3f;hpb=f1354830c806b65e6ec6dfdc66dba451715608fc;p=yaz-moved-to-github.git diff --git a/src/rpn2solr.c b/src/rpn2solr.c index 11abe87..70b2f6c 100644 --- a/src/rpn2solr.c +++ b/src/rpn2solr.c @@ -254,9 +254,9 @@ static int rpn2solr_simple(solr_transform_t ct, /* Bug 2878: Check and add Truncation */ if (checkForLeftTruncation(apt->attributes)) wrbuf_puts(w, "*"); - /* BUG 4415: Escape : (as \:) in string terms */ for (i = 0 ; i < lterm; i++) { - if (sterm[i] == ':') { + /* BUG 4415: Escape special characters in string terms */ + if (strchr("+-&|!(){}[]^\"~*?:\\", sterm[i])) { wrbuf_putc(w, '\\'); } wrbuf_putc(w, sterm[i]);