REST API result

this used to work perfectly, i really dont know what changed that it doesnt work anymore.

this is the where caluse of the REST API request:
{"category":{"$in":["glasses","books","electronics","fashion"]}, "company":{"$in":["dr.staff","magnet"]},"location": {"$nearSphere": {"__type": "GeoPoint","latitude": 32.066157,"longitude": 34.777821},"$maxDistanceInKilometers": 500}}

it will return only the records that matches the given category, company and in the given distance of 500 KM.

the location column in the REST DB is of type geolocation. the data of the location rows matches my current location (for debugging) so it should come up.

if i ommit the location column i get a full results set response.
if i try to use the location part, empty results set.

how can i debug it and understand what's wrong?

Thanks
Adi
1 person has
this problem
+1
This topic is no longer open for comments or replies.
  • If you do a curl request - do you get the right result?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited

  • Max, i found the problem and the walk around.
    here is what i did:
    Deleted the REST class and created a new one from an import file.
    when you import new class from CSV file you can't set the field to GeoPoint type, the only available types are string, number and boolean. so deleted the column holding the Geo Points and re-created the column with the correct type. then populated the rows with correct data (GeoPoints).
    until now its all REST API stuff and all OK.

    but when you go back to tiggzi app and test it will sent the currect JSON request and REST will answer but what i think happens is tiggzi is working with an open session to the previous REST class or its related to the fact the session still exist to the prev class.

    when i simply logoff and login to tiggzi all will work...

    so i would consider it as a minor defect because there is a walk-around but still this has got to be fixed.

    Thanks
    Adi
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited