Skip to content

Conversation

@mhenrixon
Copy link

@mhenrixon mhenrixon commented Jan 25, 2023

Adds alternative option syntax for tsvector_column. Adds migration for tsvector aggregation.
Adds support for tsvector columns in associated models.

Closes #499 in favor of this

pg_search_scope :full_text_search, (lambda do |query, locale = "swedish"|
    {
      query: query,
      associated_against: {
        taggings: { name: "B" },
        editables: {
          content_tsvector: { tsvector_column: true },
        },
      },
      order_within_rank: "articles.id DESC",
      using: {
        tsearch: {
          dictionary: SearchDocument.dictionary(locale),
          prefix: true,
        },
      },
    }
  end)

@mhenrixon mhenrixon force-pushed the 2.3.6/single-association-performance branch 2 times, most recently from e3fae89 to c606a56 Compare January 25, 2023 13:54
Adds alternative option syntax for tsvector_column.
Adds migration for tsvector aggregation.
Adds support for tsvector columns in associated models.
Missing: More tests and documentation.
@mhenrixon mhenrixon force-pushed the 2.3.6/single-association-performance branch from c606a56 to 8d6bcfa Compare January 25, 2023 20:18
@mhenrixon mhenrixon force-pushed the 2.3.6/single-association-performance branch 8 times, most recently from a9c76ef to 4f528b8 Compare August 16, 2023 16:39
@mhenrixon mhenrixon force-pushed the 2.3.6/single-association-performance branch from 4f528b8 to 1c633b5 Compare August 16, 2023 16:47
@Javierchik
Copy link

This is a nice addition @mhenrixon thanks.
Do you know if there are any plans to formally accept this PR?
cc @nertzy

@mhenrixon
Copy link
Author

@Javierchik i haven't heard anything back at all.

Someone posted on x.com searching for alternatives since pg_search seems dead or in maintenance mode.

The guys on @37signals are working on a rails default for search so that's probably not too far away.

Until then I am using this branch 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants