projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f48fb0d
)
Implement Solr sorting to internal Sort parameter.
author
Dennis Schafroth
<dennis@indexdata.com>
Mon, 1 Oct 2012 14:16:08 +0000
(16:16 +0200)
committer
Dennis Schafroth
<dennis@indexdata.com>
Mon, 1 Oct 2012 14:16:08 +0000
(16:16 +0200)
https://jira.indexdata.com/browse/YAZ-617
src/sortspec.c
patch
|
blob
|
history
diff --git
a/src/sortspec.c
b/src/sortspec.c
index
8d1e19c
..
e09895b
100644
(file)
--- a/
src/sortspec.c
+++ b/
src/sortspec.c
@@
-415,14
+415,15
@@
int yaz_solr_sortkeys_to_sort_spec(const char *solr_sortkeys, WRBUF w)
nmem_strsplitx(nmem, " ", sortspec[i], &arg, &num_arg, 0);
if (num_arg != 2)
- return 0;
+ return -1;
+
+ if (!strcasecmp(arg[1],"asc") &&
+ !strcasecmp(arg[1],"desc"))
+ return -1;
if (arg[1][0]) {
order = tolower(arg[1][0]);
}
- if (order != 'a' || order != 'd')
- return 0;
-
if (i)
wrbuf_puts(w, " ");