/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2010 Index Data
+ * Copyright (C) 1995-2011 Index Data
* See the file LICENSE for details.
*/
-
/**
* \file solrtransform.c
* \brief Implements SOLR transform (SOLR to RPN conversion).
- *
- * Evaluation order of rules:
- *
- * always
- * relation
- * structure
- * position
- * truncation
- * index
- * relationModifier
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <assert.h>
#include <stdlib.h>
#include <string.h>
-#include <ctype.h>
#include <yaz/rpn2solr.h>
#include <yaz/xmalloc.h>
#include <yaz/diagsrw.h>
};
-/* TODO Utility functions, evt. split out int separate file */
+/* TODO Utility functions, split out into separate file */
int solr_strcmp(const char *s1, const char *s2) {
return cql_strcmp(s1, s2);
}
}
-/* Utillity functions end */
+/* Utility functions end */
solr_transform_t solr_transform_create(void)
{
break;
}
value_str = yaz_tok_parse_string(tp);
- if (isdigit(*value_str))
+ if (yaz_isdigit(*value_str))
{
elem->which = Z_AttributeValue_numeric;
elem->value.numeric =
}
-void emit_term(solr_transform_t ct,
- struct solr_node *cn,
- const char *term, int length,
- void (*pr)(const char *buf, void *client_data),
- void *client_data)
+static void emit_term(solr_transform_t ct,
+ struct solr_node *cn,
+ const char *term, int length,
+ void (*pr)(const char *buf, void *client_data),
+ void *client_data)
{
int i;
const char *ns = cn->u.st.index_uri;
xfree(z3958_mem);
}
-void emit_terms(solr_transform_t ct,
- struct solr_node *cn,
- void (*pr)(const char *buf, void *client_data),
- void *client_data,
- const char *op)
+static void emit_terms(solr_transform_t ct,
+ struct solr_node *cn,
+ void (*pr)(const char *buf, void *client_data),
+ void *client_data,
+ const char *op)
{
struct solr_node *ne = cn->u.st.extra_terms;
if (ne)
}
}
-void emit_wordlist(solr_transform_t ct,
- struct solr_node *cn,
- void (*pr)(const char *buf, void *client_data),
- void *client_data,
- const char *op)
+static void emit_wordlist(solr_transform_t ct,
+ struct solr_node *cn,
+ void (*pr)(const char *buf, void *client_data),
+ void *client_data,
+ const char *op)
{
const char *cp0 = cn->u.st.term;
const char *cp1;