aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/service/PostgresSearchService.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-02-03 06:39:25 +0300
committerGravatar Vitaly Takmazov2023-02-03 06:39:25 +0300
commit89f20b0ff36c8413adc2aa9e3c5226ae2eed2101 (patch)
treefe56fa9f8de597ff313c334b69ffafe5adf0b95d /src/main/java/com/juick/service/PostgresSearchService.java
parent73b8c2dc544df207d8c7b9e36d20955ff1d88577 (diff)
messages_txt -> messages
Diffstat (limited to 'src/main/java/com/juick/service/PostgresSearchService.java')
-rw-r--r--src/main/java/com/juick/service/PostgresSearchService.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/main/java/com/juick/service/PostgresSearchService.java b/src/main/java/com/juick/service/PostgresSearchService.java
index 500f3d20..2493a45e 100644
--- a/src/main/java/com/juick/service/PostgresSearchService.java
+++ b/src/main/java/com/juick/service/PostgresSearchService.java
@@ -70,14 +70,10 @@ public class PostgresSearchService extends BaseJdbcService implements SearchServ
FROM
(
select
- messages.message_id message_id,
- messages.user_id user_id,
- txt,
+ message_id, user_id, txt,
to_tsvector('russian', txt) v,
websearch_to_tsquery('russian', :query) q
- from
- messages_txt
- inner join messages on messages.message_id = messages_txt.message_id
+ from messages
) t
WHERE
v @@ q