- wrbuf_printf(b, " %d %d %d ", *op->u.prox->distance,
- *op->u.prox->ordered,
- *op->u.prox->relationType);
-
- switch(op->u.prox->which)
- {
- case Z_ProximityOperator_known:
- wrbuf_putc(b, 'k');
- break;
- case Z_ProximityOperator_private:
- wrbuf_putc(b, 'p');
- break;
- default:
- wrbuf_printf(b, "%d", op->u.prox->which);
- }
- if (op->u.prox->u.known)
- wrbuf_printf(b, " %d ", *op->u.prox->u.known);
- else
- wrbuf_printf(b, " 0 ");
- }
- wrbuf_structure (b,zs->u.complex->s1, ast);
- wrbuf_structure (b,zs->u.complex->s2, ast);
- }
- else if (zs->which == Z_RPNStructure_simple)
- {
- if (zs->u.simple->which == Z_Operand_APT)
- wrbuf_apt(b, zs->u.simple->u.attributesPlusTerm);
- else if (zs->u.simple->which == Z_Operand_resultSetId)
- {
- wrbuf_printf(b, "@set ");
- wrbuf_term(b, zs->u.simple->u.resultSetId,
- strlen(zs->u.simple->u.resultSetId));
- }
- else
- wrbuf_printf (b, "(unknown simple structure)");
- }
- else
- wrbuf_puts(b, "(unknown structure)");
-}
-
-void log_rpn_query_level (int loglevel, Z_RPNQuery *rpn)
-{
- oident *attrset;
- enum oid_value ast;
-
- attrset = oid_getentbyoid (rpn->attributeSetId);
- if (attrset)
- {
- ast = attrset->value;
- yaz_log (loglevel, "RPN query. Type: %s", attrset->desc);
- }
- else
- {
- ast = VAL_NONE;
- yaz_log (loglevel, "RPN query. Unknown type");
- }
- zlog_structure (rpn->RPNStructure, 0, ast, loglevel);
-}
-
-static void wrbuf_rpn_query(WRBUF b, Z_RPNQuery *rpn)
-{
- oident *attrset;
- enum oid_value ast;
-
- attrset = oid_getentbyoid (rpn->attributeSetId);
- if (attrset)
- {
- ast = attrset->value;
- wrbuf_printf(b, " @attrset %s ", attrset->desc);
- }
- else
- {
- ast = VAL_NONE;
- wrbuf_printf (b, "Unknown:");
- }
- wrbuf_structure (b,rpn->RPNStructure, ast);
-
-}
-
-void log_rpn_query (Z_RPNQuery *rpn)