What is the recommended (read most efficient) way to obtain a single entity out of the datastore based on a value that's closest to one provided.
For example, I have the following DataModel:
class MyObject(db.Model):
someValue = db.IntegerProperty()
shortDescription = db.TextProperty()
During a GET a value is passed in, I would like to query the datastore for the object(s) that are the closest to the provided value.
Multiple results are fine if they are the same distance. I.e. if I have two objects with someValue at 2 and 4 and I pass in 3.
Any advice would be appreciated.