arc and sloppy_arc use the haversine formula while plane computes distances as if the earth was a plane.
Although plane is the fastest option, it only has good accuracy if you are not too far from the equator and if your points are close to each other. The difference between arc and sloppy_arc is that sloppy_arc uses implementations of cosinus and arcsinus that trade accuracy for speed (based on tables of values and taylor series). In my opinion, you would almost always want to use sloppy_arc as it is significantly faster than arc while the error is small enough to not be an issue for user experience. Actually, the main reason why we didn't remove the arc distance computation implementation is to be able to make sure, in case of weird distances, that the error is not due to the sloppyness of the distance computation function. Please note that even arc has accuracy issues because it assumes that the earth is round (although it is an ellipsoid) but the future release of Lucene is going to take this better into account so this will benefit Elasticsearch as well (https://issues.apache.org/jira/browse/LUCENE-5271). On Wed, Feb 19, 2014 at 4:03 PM, Hariharan Vadivelu <[email protected]>wrote: > I have a related question, I know that it supports arc (better > precision), sloppy_arc(faster but less precise) or plane (fastest) > which one of these distance types is better if I want to show the results > to the user considering driving distance between two points? > > On Wednesday, February 19, 2014 8:54:20 AM UTC-6, Binh Ly wrote: >> >> If you go here: >> >> http://www.elasticsearch.org/guide/en/elasticsearch/ >> reference/current/query-dsl-geo-distance-filter.html >> >> You can see the distance_type parameter which specifies the different >> types of calculations you can do with this filter. >> > -- > You received this message because you are subscribed to the Google Groups > "elasticsearch" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/272cb00c-24f6-49ab-8cb1-87e25bc6518c%40googlegroups.com > . > > For more options, visit https://groups.google.com/groups/opt_out. > -- Adrien Grand -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j4B%3DO7wt94ivDBV4p_Z16XjgrHPRw2d9fDU5UKDxa8B2g%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
