APIs & Integrations

ShubhangiPawar
Membro

Can we Sort with more than 1 field in Search API

 

In Search Operation for sort can't we give more than 1 field? ..like one field want in ascending and one field require in descending in single query at the same time...in documentation sort is given as array..it means it can take more than one field,but when through postman tried,throwing error as

{
    "status": "error",
    "message": "too many sorts (count: 2, max allowed: 1)",
    "correlationId": "eb421a70-2306-4731-9eb9-b79433ac80b1",
    "category": "VALIDATION_ERROR"
}

0 Avaliação positiva
2 Respostas 2
webdew
Orientador(a) | Parceiro Diamante
Orientador(a) | Parceiro Diamante

Can we Sort with more than 1 field in Search API

Hi @ShubhangiPawar ,

No , we can give only one filled: and max filter we can go for three only: here is screenshot: https://prnt.sc/26k0brh

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.
Thanks and Regards. 

0 Avaliação positiva
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Can we Sort with more than 1 field in Search API

According to the documentation:

Only one sorting rule can be applied to any search.

0 Avaliação positiva