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

Adds support for tsvector_column in associated_against (pg_search_scope) #504

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

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
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.

2 participants