Problem with Sort

Hey guys,
I am trying to set up rank sorting on one of my indices.
It’s working fine when I am doing it in my admin panel, but I want it to be programmable and. I am passing the ranking string and the returned result just does not match the requested conditions.
The records are definitely not sorted(ranked) in any kind of way.
Any help is appreciated.

var rankingString = "asc(title)";
          ranking: [
      }).then(() => {'', {
              hitsPerPage: pageSize,
              page: page,
              filters : filters,
              numericFilters: numericFilters,