Skip to content

Full-text search ascending/descending bug (typo?) #5504

Closed
@rihadavid

Description

@rihadavid

I have just discovered that when I want to use a full-text search with ordering, only query.ascending('$score') is working. query.descending('$score') throws "Invalid field name: $score.".

When you are doing a full-text search, you obviously want the results with a higher score first, so it should be descending. But here's the thing - it actually returns the results in descending order.

It seems to be only a wording bug, but fixing it might be tricky because developers who are already using the query.ascending('$score') for getting the descending results will not expect the change in future version.

Maybe the safest 'fix' would be to add a warning note to the docs that this wording mistake has been made and ignore it. Nobody will probably ever need (actually) ascending results anyway 😄

Tested on 2.8.4, 3.1.3, 3.2.3 in cloud code function

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumedtype:docsOnly change in the docs or README

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions