projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add link to memcached(3) man page online
[yaz-moved-to-github.git]
/
src
/
rpn2solr.c
diff --git
a/src/rpn2solr.c
b/src/rpn2solr.c
index
8006847
..
c9143c7
100644
(file)
--- a/
src/rpn2solr.c
+++ b/
src/rpn2solr.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2013 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
/**
* See the file LICENSE for details.
*/
/**
@@
-232,6
+232,7
@@
static int emit_term(solr_transform_t ct, WRBUF w, Z_Term *term, Odr_int trunc)
solr_transform_set_error(ct, YAZ_BIB1_TERM_TYPE_UNSUPP, 0);
return -1;
}
solr_transform_set_error(ct, YAZ_BIB1_TERM_TYPE_UNSUPP, 0);
return -1;
}
+
if (sterm)
{
size_t i;
if (sterm)
{
size_t i;
@@
-242,6
+243,8
@@
static int emit_term(solr_transform_t ct, WRBUF w, Z_Term *term, Odr_int trunc)
must_quote = 1;
if (must_quote)
wrbuf_puts(w, "\"");
must_quote = 1;
if (must_quote)
wrbuf_puts(w, "\"");
+ if (trunc == 2 || trunc == 3)
+ wrbuf_puts(w, "*");
for (i = 0 ; i < lterm; i++)
{
if (sterm[i] == '\\' && i < lterm - 1)
for (i = 0 ; i < lterm; i++)
{
if (sterm[i] == '\\' && i < lterm - 1)
@@
-267,7
+270,7
@@
static int emit_term(solr_transform_t ct, WRBUF w, Z_Term *term, Odr_int trunc)
else
wrbuf_putc(w, sterm[i]);
}
else
wrbuf_putc(w, sterm[i]);
}
- if (trunc == 1)
+ if (trunc == 1 || trunc == 3)
wrbuf_puts(w, "*");
if (must_quote)
wrbuf_puts(w, "\"");
wrbuf_puts(w, "*");
if (must_quote)
wrbuf_puts(w, "\"");
@@
-306,7
+309,7
@@
static int rpn2solr_simple(solr_transform_t ct,
ret = rpn2solr_attr(ct, apt->attributes, w);
if (ret)
return ret;
ret = rpn2solr_attr(ct, apt->attributes, w);
if (ret)
return ret;
- if (trunc == 0 || trunc == 1 || trunc == 100 || trunc == 104)
+ if ((trunc >= 0 && trunc <= 3) || trunc == 100 || trunc == 104)
;
else
{
;
else
{