aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/service/search
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick/service/search')
-rw-r--r--juick-server/src/main/java/com/juick/service/search/SphinxSearchServiceImpl.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-server/src/main/java/com/juick/service/search/SphinxSearchServiceImpl.java b/juick-server/src/main/java/com/juick/service/search/SphinxSearchServiceImpl.java
index de0a101f..161e0fb2 100644
--- a/juick-server/src/main/java/com/juick/service/search/SphinxSearchServiceImpl.java
+++ b/juick-server/src/main/java/com/juick/service/search/SphinxSearchServiceImpl.java
@@ -49,7 +49,7 @@ public class SphinxSearchServiceImpl implements SearchService {
return namedParameterSearchJdbcTemplate.queryForList(
"SELECT id AS message_id FROM messages WHERE MATCH(:search) " +
(messageIdBefore > 0 ?
- " AND id < :before " : "") +
+ " AND id < :before " : StringUtils.EMPTY) +
" ORDER BY id DESC LIMIT :limit",
sqlParameterSource,
Integer.class);
@@ -69,7 +69,7 @@ public class SphinxSearchServiceImpl implements SearchService {
return namedParameterSearchJdbcTemplate.queryForList(
"SELECT id AS message_id FROM messages WHERE user_id = :userId AND MATCH(:search) " +
(messageIdBefore > 0 ?
- " AND id < :before " : "") +
+ " AND id < :before " : StringUtils.EMPTY) +
" ORDER BY id DESC LIMIT :limit",
sqlParameterSource,
Integer.class);