projects
/
pazpar2-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added relevance to return rec
[pazpar2-moved-to-github.git]
/
src
/
logic.c
diff --git
a/src/logic.c
b/src/logic.c
index
8c2d070
..
697da4d
100644
(file)
--- a/
src/logic.c
+++ b/
src/logic.c
@@
-505,10
+505,14
@@
static struct database_criterion *parse_filter(NMEM m, const char *buf)
int subnum;
int subi;
struct database_criterion *new = nmem_malloc(m, sizeof(*new));
int subnum;
int subi;
struct database_criterion *new = nmem_malloc(m, sizeof(*new));
- char *eq = strchr(values[i], '=');
+ char *eq;
+ if (eq = strchr(values[i], '='))
+ new->type = PAZPAR2_STRING_MATCH;
+ if (eq = strchr(values[i], '~'))
+ new->type = PAZPAR2_SUBSTRING_MATCH;
if (!eq)
{
if (!eq)
{
- yaz_log(YLOG_WARN, "Missing equal-sign in filter");
+ yaz_log(YLOG_WARN, "Missing equal-signi/tilde in filter");
return 0;
}
*(eq++) = '\0';
return 0;
}
*(eq++) = '\0';