The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

cc2010 (3) [Avatar] Offline
#1
On page 316 (the digital version) of Chapter 9:

NOTE: If your main concern is the search score, and a rough bounding box will suffice for precision—for example, all documents in the West Coast compared to all documents precisely within 1,000 miles sorted by distance—then use the DistanceQueryBuilder with needPrecise set to false. You can calculate distances at display time with DistanceUtils. getInstance().getDistanceMi(search_lat, search_long, result_lat, result_lng);.


Can you clarify the part that says:

within 1,000 miles sorted by distance—then use the DistanceQueryBuilder with needPrecise set to false.
?

How can you sort by distance while setting the needPrecise parameter to false?

Thanks,
Chad
otis (156) [Avatar] Offline
#2
Re: clarification on the distance search
Chad, I think you'll find some answers here: http://search-lucene.com/?q=needPrecise

Otis