iahiqosolutions
13 years agoAdvisor
REST API: Sorting messages by replies count works incorrectly
Hello guys,
It seems that sorting by replies count works incorrectly,
I use the following request:
http://%Community Name%.stage.lithium.com/restapi/vc/categories/id/%Category Id%/search/messages?page=1&page_size=10&q=the&restapi.format_detail=full_list_element&search_type=thread&sort_by=-replies
This request returns 10 messages with following ids:
- 443
- 587
- 351
- 671
- 499
- 143
- 485
- 655
- 25
- 397
For each of these messages I get count of replies by the following request:
http://%Community Name%.stage.lithium.com/restapi/vc/messages/id/%Message ID%/replies/count
And this returns the following results:
- 443 (14 replies)
- 587 (13 replies)
- 351 (9 replies)
- 671 (9 replies)
- 499 (9 replies)
- 143 (10 replies)
- 485 (7 replies)
- 655 (7 replies)
- 25 (6 replies)
- 397 (4 replies)
As you can see something wrong with message order, because message with id 143(10 replies) is placed only on the 6 postion.
Can someone explain me such strange behavior?