SearchSort#descending not doing anything?

java

#1

I’m using Couchbase java client version 2.5.9.

I see that the SearchSort class has a method #descending(boolean) that adds a “descending”: true/false to the FTS sort object.

However reading from the documentation I see that to get descending order from the FTS API, you should prefix the field name with a “-” sign.

What is the purpose of SearchSort#descending field? This is quite confusing, could the SDK automatically prepend the “-” sign based on SearchSort#descending property?