projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d2cc75
)
Encode special characters in term
author
Dennis Schafroth
<dennis@indexdata.com>
Fri, 15 Jul 2011 13:47:55 +0000
(15:47 +0200)
committer
Dennis Schafroth
<dennis@indexdata.com>
Fri, 15 Jul 2011 13:47:55 +0000
(15:47 +0200)
src/rpn2solr.c
patch
|
blob
|
history
diff --git
a/src/rpn2solr.c
b/src/rpn2solr.c
index
11abe87
..
70b2f6c
100644
(file)
--- 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]);