title: Spatial search with ravenDB
body: <p>I have a rather specific spatial search I need to do.  Basically, have an object (lets call it obj1) with two locations, lets call them point A and point B.  </p>
  
  <p>I then have a collection of objects(lets call each one obj2) each with their own A and B locations.</p>
  
  <p>I want to return the top 10 objects from the collection sorted by:</p>
  
  <p>(distance from obj1 A to obj2A) + (the distance from obj1B to obj2B)</p>
  
  <p>Any ideas?
  Thanks,
  Nick</p>
  
  <p>Update:
  Here's a little more detail on the documents and how I want to compare them.  </p>
  
  <p>The domain model:</p>
  
  <p>Listing:
  ListingId int
  Title string
  Price double
  Origin Location
  Destination Location</p>
  
  <p>Location:
  Post / Zipcode string
  Latitude decimal
  Longitude decimal</p>
  
  <p>What i want to do is take a listing object (not in the database) and compare it with the collection of listings in the database.  I want the query to return the top 12 (or x) number of listings sorted by the crow flies distance from the origins plus the crow flies distance from destinations.  </p>
  
  <p>I don't care about the distance from origin to destination - only about the distance of origin to origin plus destination to destination.  </p>
  
  <p>Basically Im trying to find listings where the starting and ending locations are close.</p>
  
  <p>Please let me know if I can clarify more.
  Thanks!</p>