问题
The parse-server documentation is a bit outdated: http://docs.parseplatform.org/rest/guide/
Try this query:
curl -X GET \
-H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-REST-API-Key: ${REST_API_KEY}" \
-G \
--data-urlencode 'where={"name":{"$text":{"$search":{"$term":"Milk"}}}}' \
--data-urlencode 'order="$score"' \
--data-urlencode 'key="$score"' \
https://localhost:1337/parse/classes/Groceries
And it with return this error:
{
"code": 102,
"error": "Invalid parameter for query: key"
}
Question, how do you sort by "score" when doing Full-text search with Parse if the query parameters does not work?
来源:https://stackoverflow.com/questions/49826408/sort-does-not-work-on-text-query-with-parse-server