Only reseting on position, when not done before. Otherwise it would reset on every...
[pazpar2-moved-to-github.git] / src / http_command.c
index 4575ef3..7676eef 100644 (file)
@@ -1188,7 +1188,7 @@ static void cmd_show(struct http_channel *c)
         release_session(c, s);
         return;
     }
-    session_sort(s->psession, sp->name, sp->increasing, 0);
+    session_sort(s->psession, sp->name, sp->increasing, sp->type == Metadata_sortkey_position);
                  /* TODO This was too simple. Will make pazpar2 continuing reseting the session resultset and redo the search. Disable this for now
                     sp->type == Metadata_sortkey_position */