# New "score" property in ParseObject

**URL:** <https://community.parseplatform.org/t/new-score-property-in-parseobject/2352>\
**Category:** ParseSwift SDK\
**Created:** [January 10, 2022, 8:53am UTC](https://community.parseplatform.org/t/new-score-property-in-parseobject/2352 "2022-01-10T08:53:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayson](https://community.parseplatform.org/user_avatar/community.parseplatform.org/jayson/32/679_2.png) [@jayson](https://community.parseplatform.org/u/jayson)\
**Post date:** [January 10, 2022, 8:53am UTC](https://community.parseplatform.org/t/new-score-property-in-parseobject/2352/1 "2022-01-10T08:53:47Z")

</div>

So I just updated to the latest version of ParseSwift 3.1.0 and got this error on my ParseObjects.

 ![Screen Shot 2022-01-10 at 4.49.28 PM](https://parse-community-forum-uploads.s3.dualstack.us-east-1.amazonaws.com/original/2X/5/555687eb067513c375eb065150ff09c5ef2fe151.png)

I was wondering what the best use case for it and why it was added. I was looking at the commit and didn’t see any explanation for it.

Is it the lower the number, the more priority it has on matchesText()?

thanks,

---

<div class="post-metadata">

**Author:** ![cbaker6](https://community.parseplatform.org/user_avatar/community.parseplatform.org/cbaker6/32/114_2.png) [@cbaker6](https://community.parseplatform.org/u/cbaker6)\
**Post date:** [January 10, 2022, 7:09pm UTC](https://community.parseplatform.org/t/new-score-property-in-parseobject/2352/2 "2022-01-10T19:09:50Z")

</div>

The screenshot you posted shows the comment for score which shows up in the [documentation](http://parseplatform.org/Parse-Swift/api/Protocols/ParseObject.html#/s:10ParseSwift0A6ObjectP5scoreSdSgvp). The PR that made the `score` addition links to the Parse Server issue/PR that added `score` on the server side

> <https://github.com/parse-community/parse-server/issues/3747>
>
> Hi, I wanted to know if parse-server support \*\*full text search\*\*. The full text… search is available since MongoDB version 2.6 and it is possible to create text index (currently only one) which provides efficient search capabilities on text fields.
> 
> From the code it looks like that this capability has not been implemented ...
> 
> In case we need to add this capability i think we should perform the following tasks: 
> 
> 1. Write the server side code (probably modify the MongoDB storage adapter)
> 2. Update Parse rest api endpoints
> 3. Update all client SDK's (at least iOS/Android/Javascript)
> 
> Thanks.

If you look at [matchesText in the documentation](http://parseplatform.org/Parse-Swift/api/Functions.html#/s:10ParseSwift11matchesText3key4text7optionsAA15QueryConstraintVSS_SSSDyAA0aD6OptionOSE_pGtKF) it states:

> In order to sort you must use `Query.sortByTextScore()` . To retrieve the weight/rank, access the “score” property of your `ParseObject` .

The explanation for why it was added to a ParseObject as a key and why it’s a breaking change is in the [ParseObject documentation](http://parseplatform.org/Parse-Swift/api/Protocols/ParseObject.html#/s:10ParseSwift0A6ObjectP5scoreSdSgvp):

 ![image](https://parse-community-forum-uploads.s3.dualstack.us-east-1.amazonaws.com/original/2X/4/4da8e244ea0edc1d8df9e0ff8ed60da64bdd98ff.png)

The Playgrounds shows how to use it:

> <https://github.com/parse-community/Parse-Swift/blob/3bf2471790cc9962f35974f495b02c8d06b1a232/ParseSwift.playground/Pages/8%20-%20Pointers.xcplaygroundpage/Contents.swift#L215-L233>

If you have trouble fixing your error, directions are in the release:

> **[Release 3.0.0 · parse-community/Parse-Swift](https://github.com/parse-community/Parse-Swift/releases/tag/3.0.0)**
>
> Full Changelog
> New features
> 
> Adds equalTo QueryConstraint along with ability to change the SDK default behavior of using $eq QueryConstraint parameter or not (#310), thanks to @cbaker6.
> Adds isNull...

---

<div class="post-metadata">

**Author:** ![jayson](https://community.parseplatform.org/user_avatar/community.parseplatform.org/jayson/32/679_2.png) [@jayson](https://community.parseplatform.org/u/jayson)\
**Post date:** [January 11, 2022, 6:58am UTC](https://community.parseplatform.org/t/new-score-property-in-parseobject/2352/3 "2022-01-11T06:58:57Z")

</div>

I think I got the gist of it. So it’s basically there for when we use matchesQuery.

Thanks again 🙂
