Skip to content

Optimize attachment full text search #93

@vlymar

Description

@vlymar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions