projects
/
pazpar2-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:
d2db0f7
)
Implement sort-default lookup in search too
author
Dennis Schafroth
<dennis@indexdata.com>
Wed, 19 Sep 2012 14:22:08 +0000
(16:22 +0200)
committer
Dennis Schafroth
<dennis@indexdata.com>
Wed, 19 Sep 2012 14:22:08 +0000
(16:22 +0200)
src/http_command.c
patch
|
blob
|
history
diff --git
a/src/http_command.c
b/src/http_command.c
index
6c5732e
..
2097eee
100644
(file)
--- a/
src/http_command.c
+++ b/
src/http_command.c
@@
-1278,6
+1278,7
@@
static void cmd_search(struct http_channel *c)
enum pazpar2_error_code code;
const char *addinfo = 0;
struct reclist_sortparms *sp;
+ struct conf_service *service = 0;
if (!s)
return;
@@
-1294,8
+1295,10
@@
static void cmd_search(struct http_channel *c)
release_session(c, s);
return;
}
- if (!sort)
- sort = "relevance";
+ service = s->psession->service;
+ if (!sort) {
+ sort = service->default_sort;
+ }
if (!(sp = reclist_parse_sortparms(c->nmem, sort, s->psession->service)))
{
error(c->response, PAZPAR2_MALFORMED_PARAMETER_VALUE, "sort");