25 int server_choice = 1;
46 return "cql.serverChoice";
129 if (i1 && i2 && !strcmp(i1, i2) && rel1 && rel2)
131 if ((rel1[0] ==
'>' || rel1[0] ==
'g') &&
132 (rel2[0] ==
'<' || rel2[0] ==
'l'))
138 if ((rel2[0] ==
'>' || rel2[0] ==
'g') &&
139 (rel1[0] ==
'<' || rel1[0] ==
'l'))
162 if (strcmp(index,
"cql.serverChoice"))
168 if (strcmp(structure,
"*"))
202 #define SOLR_SPECIAL "+-&|!(){}[]^\"~*?:\\"
207 const char *sterm = 0;
219 lterm = strlen(sterm);
234 for (i = 0 ; i < lterm; i++)
240 if (trunc == 2 || trunc == 3)
242 for (i = 0 ; i < lterm; i++)
244 if (sterm[i] ==
'\\' && i < lterm - 1)
251 else if (sterm[i] ==
'?' && trunc == 104)
255 else if (sterm[i] ==
'#' && trunc == 104)
267 if (trunc == 1 || trunc == 3)
276 void (*pr)(
const char *buf,
void *client_data),
284 const char *relation2 = 0;
305 if ((trunc >= 0 && trunc <= 3) || trunc == 100 || trunc == 104)
314 else if (relation1[0] ==
'<' || relation1[0] ==
'l')
318 if (!strcmp(relation1,
"le") || !strcmp(relation1,
"<="))
323 else if (relation1[0] ==
'>' || relation1[0] ==
'g')
325 if (!strcmp(relation1,
">=") || !strcmp(relation1,
"ge"))
334 if (!relation2 || !strcmp(relation2,
"<=") ||
335 !strcmp(relation2,
"le"))
352 void (*pr)(
const char *buf,
void *client_data),
374 pr(
"(", client_data);
382 pr(
" AND ", client_data);
385 pr(
" OR ", client_data);
388 pr(
" AND NOT ", client_data);
395 pr(
")", client_data);
402 void (*pr)(
const char *buf,
void *client_data),
414 void (*pr)(
const char *buf,
void *client_data),
Diagnostics: Generated by csvtodiag.tcl from ./bib1.csv.
#define YAZ_BIB1_UNSUPP_TRUNCATION_ATTRIBUTE
#define YAZ_BIB1_UNSUPP_USE_ATTRIBUTE
#define YAZ_BIB1_UNSUPP_RELATION_ATTRIBUTE
#define YAZ_BIB1_RESULT_SET_UNSUPP_AS_A_SEARCH_TERM
#define YAZ_BIB1_TERM_TYPE_UNSUPP
#define YAZ_BIB1_UNSUPP_SEARCH
static int check_range(solr_transform_t ct, Z_Complex *q, Z_AttributesPlusTerm **p_apt1, Z_AttributesPlusTerm **p_apt2)
int solr_transform_rpn2solr_wrbuf(solr_transform_t ct, WRBUF w, Z_RPNQuery *q)
transforms RPN query to SOLR WRBUF
static int rpn2solr_simple(solr_transform_t ct, void(*pr)(const char *buf, void *client_data), void *client_data, Z_AttributesPlusTerm *apt, WRBUF w, Z_AttributesPlusTerm *apt2)
static const char * lookup_relation_index_from_attr(Z_AttributeList *attributes)
static int rpn2solr_structure(solr_transform_t ct, void(*pr)(const char *buf, void *client_data), void *client_data, Z_RPNStructure *q, int nested, WRBUF w)
static int emit_term(solr_transform_t ct, WRBUF w, Z_Term *term, Odr_int trunc)
static const char * lookup_index_from_string_attr(Z_AttributeList *attributes)
int solr_transform_rpn2solr_stream_r(solr_transform_t ct, WRBUF addinfo, void(*pr)(const char *buf, void *client_data), void *client_data, Z_RPNQuery *q)
transforms RPN query to SOLR output stream (re-entrant)
static Odr_int get_truncation(Z_AttributesPlusTerm *apt)
static int rpn2solr_attr(solr_transform_t ct, Z_AttributeList *attributes, WRBUF w)
int solr_transform_rpn2solr_stream(solr_transform_t ct, void(*pr)(const char *buf, void *client_data), void *client_data, Z_RPNQuery *q)
transforms RPN query to SOLR output stream (NOT re-entrant)
Header for RPN to SOLR tranform.
union Z_AttributeElement::@50 value
Z_ComplexAttribute * complex
Z_AttributeElement ** attributes
Z_AttributeList * attributes
Z_StringOrNumeric ** list
Z_AttributesPlusTerm * attributesPlusTerm
Z_RPNStructure * RPNStructure
union Z_RPNStructure::@46 u
union Z_StringOrNumeric::@72 u
Z_InternationalString * string
Z_InternationalString * characterString
void wrbuf_destroy(WRBUF b)
destroy WRBUF and its buffer
void wrbuf_rewind(WRBUF b)
empty WRBUF content (length of buffer set to 0)
WRBUF wrbuf_alloc(void)
construct WRBUF
void wrbuf_printf(WRBUF b, const char *fmt,...)
writes printf result to WRBUF
void wrbuf_vp_puts(const char *buf, void *client_data)
appends C-string to WRBUF - void pointer variant
const char * wrbuf_cstr(WRBUF b)
returns WRBUF content as C-string
void wrbuf_puts(WRBUF b, const char *buf)
appends C-string to WRBUF
Header for WRBUF (growing buffer)
Header for memory handling functions.
ASN.1 Module Z39-50-APDU-1995.
#define Z_AttributeValue_numeric
#define Z_Operator_and_not
#define Z_Term_characterString
#define Z_ProximityOperator_Prox_lessThanOrEqual
#define Z_AttributeValue_complex
#define Z_StringOrNumeric_string
#define Z_ProximityOperator_Prox_lessThan
#define Z_RPNStructure_simple
#define Z_ProximityOperator_Prox_equal
#define Z_ProximityOperator_Prox_greaterThan
#define Z_ProximityOperator_Prox_greaterThanOrEqual
#define Z_ProximityOperator_Prox_notEqual