Skip to content

Full text search and sort by $score but need to have all columns of the class in the result #6136

@vshy108

Description

@vshy108

For simple class, I can sort the query result by select the columns i want like below

const q = new Parse.Query('City').fullText('CityNameEN', newKeyword).select(
            'CityNameEN',
            'CityNameCN',
            'State',
            'CountryNameCN',
            'CountryNameEN',
            'objectId',
            '$score'
          )
            .ascending('$score');

but the problem now is when I want to deal with a complex class that have many columns that include array, object, pointer type. I found that it is quite hard to select all what I need.

Is it possible that I can select all and also the @score so that I can sort ascending with the $score? thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions