Skip to content

regconfig not used when sorting #75

@siddhantgoel

Description

@siddhantgoel

In the search function, if the sort parameter is set to True, there's the following code snippet -

    query = query.filter(
        vector.op('@@')(sa.func.tsq_parse(regconfig, search_query))
    )
    if sort:
        query = query.order_by(
            sa.desc(
                sa.func.ts_rank_cd(
                    vector,
                    sa.func.tsq_parse(search_query)
                )
            )
        )

Is there a reason why regconfig is not used in the call to tsq_parse when applying the order_by clause? I'm noticing out-of-order results since I'm not using the default regconfig and suspect this might be the root cause.

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