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

regconfig not used when sorting #75

Open
siddhantgoel opened this issue Jan 23, 2019 · 0 comments · May be fixed by #110
Open

regconfig not used when sorting #75

siddhantgoel opened this issue Jan 23, 2019 · 0 comments · May be fixed by #110

Comments

@siddhantgoel
Copy link

siddhantgoel commented Jan 23, 2019

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.

paradoxxxzero added a commit to paradoxxxzero/sqlalchemy-searchable that referenced this issue Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant