Sort does not work on Text query with parse-server

。_饼干妹妹 提交于 2019-12-25 01:29:16

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!