FreeFeed/freefeed-server

No search result for groups

k0fi opened this issue · 6 comments

k0fi commented

Hello,
On my local example of freefeed, whatever string that I search (either group name or description) returns no results.
Also all-groups returns 404.
How can I fix these?

Enable debug logging and see what SQL statement is being executed.
Then you can see if there is an issue by running this SQL statement manually.

k0fi commented

Where and how should enable debug loggin?

start server with additional env-var: DEBUG='*,-babel'. so it will be something like NODE_ENV=production DEBUG='*,-babel' yarn start

k0fi commented

Well, I dont's see any errors in the terminal after searching a term.

While there is a group called chien, no search result is displayed.

Here is the query:

  knex:bindings [] undefined +1ms
  knex:client releasing connection to pool: __knexUid8 +3ms
  freefeed:sql select * from (select "posts".* from "posts" inner join "feeds" on posts.destination_feed_ids # feeds.id > 0 and feeds.name='Posts' inner join "users" on feeds.user_id=users.uid and not users.is_private where to_tsvector('pg_catalog.russian', posts.body) @@ to_tsquery('pg_catalog.russian', 'chien')   union select "posts".* from "posts" inner join "feeds" on posts.destination_feed_ids # feeds.id > 0 and feeds.name='Posts' inner join "users" on feeds.user_id=users.uid and not users.is_private where
          posts.uid in (
            select post_id from comments where to_tsvector('pg_catalog.russian', comments.body) @@ to_tsquery('pg_catalog.russian', 'chien')  
          )  union select "posts".* from "posts" where "posts"."user_id" = 'dc330490-5405-42bc-b833-a2487fd696af' and to_tsvector('pg_catalog.russian', posts.body) @@ to_tsquery('pg_catalog.russian', 'chien')  union select "posts".* from "posts" where "posts"."user_id" = 'dc330490-5405-42bc-b833-a2487fd696af' and
          posts.uid in (
            select post_id from comments where to_tsvector('pg_catalog.russian', comments.body) @@ to_tsquery('pg_catalog.russian', 'chien')  
          )  union select "posts".* from "posts" inner join "feeds" on posts.destination_feed_ids # feeds.id > 0 and feeds.name='Posts' inner join "users" on feeds.user_id=users.uid and users.is_private=true where to_tsvector('pg_catalog.russian', posts.body) @@ to_tsquery('pg_catalog.russian', 'chien')  and "feeds"."id" in (23741,23747,23746,23748)  union select "posts".* from "posts" inner join "feeds" on posts.destination_feed_ids # feeds.id > 0 and feeds.name='Posts' inner join "users" on feeds.user_id=users.uid and users.is_private=true where
          posts.uid in (
            select post_id from comments where to_tsvector('pg_catalog.russian', comments.body) @@ to_tsquery('pg_catalog.russian', 'chien')  
          )
          and "feeds"."id" in (23741,23747,23746,23748) ) as found_posts order by found_posts.bumped_at desc offset 0 limit 31 [took 4ms] +5ms

I would suggest viewing the tables and running the query manually trying to understand what is the issue.

Closing as there was no additional feedback