aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-07-16 14:47:46 +0300
committerGravatar Vitaly Takmazov2018-07-16 14:48:06 +0300
commita8a32a0957ea014b1204b037164cb7d53cccd0c7 (patch)
treefd847074ca82dac12889eb00cdc111a395a71e61 /juick-server/src/main/java/com
parent72d6b69ea234a67bb392f21dac9dea1a2d28b6f5 (diff)
sphinx search: sort by weight first
Diffstat (limited to 'juick-server/src/main/java/com')
-rw-r--r--juick-server/src/main/java/com/juick/service/SphinxSearchService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-server/src/main/java/com/juick/service/SphinxSearchService.java b/juick-server/src/main/java/com/juick/service/SphinxSearchService.java
index f102ab47..f2f31295 100644
--- a/juick-server/src/main/java/com/juick/service/SphinxSearchService.java
+++ b/juick-server/src/main/java/com/juick/service/SphinxSearchService.java
@@ -46,7 +46,7 @@ public class SphinxSearchService extends BaseJdbcService implements SearchServic
Map<String, String> sphinxQuery = new HashMap<>();
sphinxQuery.put("limit", String.valueOf(maxResult));
sphinxQuery.put("mode", "any");
- sphinxQuery.put("sort", "extended:@id desc");
+ sphinxQuery.put("sort", "extended:@weight desc, @id desc");
if (messageIdBefore > 0) {
sphinxQuery.put("maxid", String.valueOf(messageIdBefore - 1));
}
@@ -65,7 +65,7 @@ public class SphinxSearchService extends BaseJdbcService implements SearchServic
Map<String, String> sphinxQuery = new HashMap<>();
sphinxQuery.put("limit", String.valueOf(maxResult));
sphinxQuery.put("mode", "any");
- sphinxQuery.put("sort", "extended:@id desc");
+ sphinxQuery.put("sort", "extended:@weight desc, @id desc");
if (messageIdBefore > 0) {
sphinxQuery.put("maxid", String.valueOf(messageIdBefore - 1));
}