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

Optimize attachment full text search #93

Open
vlymar opened this issue Jan 9, 2017 · 0 comments
Open

Optimize attachment full text search #93

vlymar opened this issue Jan 9, 2017 · 0 comments

Comments

@vlymar
Copy link
Contributor

vlymar commented Jan 9, 2017

When an attachment is uploaded, we attempt to extract the text and store it in the attachments table. That text is then used for full text search when filtering in /opportunities. This triggers very expensive joins, aggregations, and to_tsvector function calls which collectively consume
large amounts of memory.

To better support searching through lots of large attachments we should find another approach to FTS other than pg_search's "associated_against" feature, which is not ideal for this use case.

I think it would make sense to create a dedicated search index and use pg_search's "multisearch" approach. We'd possibly have to make some changes to, or work around Filterer code.

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

No branches or pull requests

1 participant