1
0
-1

I'm trying to sort by different animal fields using "resultSort", but it's doesn't seem to work 100%.  For example, I tried sorting by animalLocationDistance.  Here's an approximation of the animal order that's displaying.  As you can see, overall, the sorting is working because it goes from smallest to largest, but it's not exact because it jumps around a bit.  It seems like it gets more accurate as the distance increases though.  This same thing happens when I sort with other fields, such as animalBreed.  Is there any reason for this slight inaccuracy in the order?

animal 1 - 13 miles
animal 2 - 12 miles
animal 3 - 13 miles
animal 4 - 13 miles
animal 5 - 8 miles
animal 6 - 12 miles
animal 7 - 18 miles
animal 8 - 15 miles
animal 9 - 16 miles
animal 10 - 14 miles
animal 11 - 13 miles
animal 20 - 25 miles
animal 50 - 40 miles
animal 51 - 35 miles
animal 70 - 60 miles
...
animal 100 - 80 miles
  1. Richard [RG]

    Angelina, what you are describing doesn't sound right – we can take a look at it.  Please open a support ticket and provide the full query you are making the API so we can reproduce the issue and get it resolved.  https://support.rescuegroups.org

  2. Angelina R

    Hi Richard, 

    I just submitted the support ticket.  Thank you.

CommentAdd your comment...

1 answer

  1.  
    1
    0
    -1

    Angelina,

    If you look at the raw results from the API you'll see that the objects are sorted correctly.

    Your client is sorting them without your knowledge... you'll notice that the results are sorted by the Key (ie., animalID).

    Richard

      CommentAdd your comment...