parse-community / parse-community/parse-server
Full text search and sort by $score but need to have all columns of the class in the result
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Parse.Query fullText, select, and ascending calls shown in the issue, then trace how selecting fields interacts with the $score sort value. Check the query behavior for classes containing arrays, objects, and pointers. Done means a query can return all class fields while retaining $score for sorting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100