Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add some search functionality #1406

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

add some search functionality #1406

wants to merge 3 commits into from

Commits on Oct 22, 2023

  1. attempt to add pg_search

    this commit is an attempt at building a search functionality using only
    the stuff provided by postgresql
    
    it is, unfortunately, painfully slow:
    
        PgSearch::Document Load (7869.1ms)  SELECT "pg_search_documents".* FROM "pg_search_documents" INNER JOIN (SELECT "pg_search_documents"."id" AS pg_search_id, (ts_rank((to_tsvector('simple', coalesce("pg_search_documents"."content"::text, ''))), (to_tsquery('simple', ''' ' || 'awoo' || ' ''')), 0)) AS rank FROM "pg_search_documents" WHERE ((to_tsvector('simple', coalesce("pg_search_documents"."content"::text, ''))) @@ (to_tsquery('simple', ''' ' || 'awoo' || ' ''')))) AS pg_search_ce9b9dd18c5c0023f2116f ON "pg_search_documents"."id" = pg_search_ce9b9dd18c5c0023f2116f.pg_search_id ORDER BY pg_search_ce9b9dd18c5c0023f2116f.rank DESC, "pg_search_documents"."id" ASC LIMIT $1  [["LIMIT", 10]]
    nilsding committed Oct 22, 2023
    Configuration menu
    Copy the full SHA
    c14bae7 View commit details
    Browse the repository at this point in the history
  2. remove pg_search

    nilsding committed Oct 22, 2023
    Configuration menu
    Copy the full SHA
    d5c1e66 View commit details
    Browse the repository at this point in the history
  3. add meilisearch

    this thing is way too fast!  only downside is that indexing takes a bit
    longer, and the search indexes are big (16Gi for 2.7 million records)
    
    i have no idea how to properly integrate it in the UI, but it seems
    promising :^)
    nilsding committed Oct 22, 2023
    Configuration menu
    Copy the full SHA
    44871cb View commit details
    Browse the repository at this point in the history