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

Obey result sorting if caller explicitly uses order_by() on query #32

Closed
wants to merge 1 commit into from

Conversation

davebarkerxyz
Copy link

When calling .query.whoosh_search(), sometimes I want order my results by a certain column and not the Whoosh rank of the record.

For example, I want to allow users to search by product name but ultimately order the results my alphanumeric product code.

The former behaviour of Flask-WhooshAlchemy is to silently ignore the order_by clause. The proposed new behaviour is to obey the order_by clause when the user has specified it on the query.

@lu-zero
Copy link

lu-zero commented Nov 8, 2015

This is quite helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants