apache / apache/lucene

SloppyMath is too accurate [LUCENE-7124]

Open
#8,179 3 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Major type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Followup from #8178:

Latitude/longitude values are encoded by GeoPointField/LatLonPoint with 1E-6 or 1E-7 error.

However, the sloppy distance formula is far too accurate to the actual (10nm), making it slower and relying on large tables. We should only do as good as we need, and especially try to reduce the huge tables.

---
Migrated from [LUCENE-7124](https://issues.apache.org/jira/browse/LUCENE-7124) by Robert Muir (@rmuir), updated Mar 22 2016
Attachments: [LUCENE-7124.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-7124/LUCENE-7124.patch)

Contributor guide

Open the contributing guide

Research direction

Read the GeoPointField and LatLonPoint implementations and the LUCENE-7124.patch attachment first. Compare the sloppy distance formula's accuracy with the encoding error, then investigate how its large tables affect performance. Done means achieving only the accuracy required by the encoded coordinates while reducing the table footprint without changing expected distance behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.