apache / apache/lucene

Make BaseGeoPointTestCase more debuggable [LUCENE-7189]

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

Description

This class tests queries (boxes, circles, polygons) against indexed documents and fails if the query is wrong.

Unfortunately it can be hard to debug (depending which test method failed, if it was NIGHTLY, etc).

It is making issues challenging/slower to debug for me on #8240. In general i have found debugging geo related issues is difficult, we should invest more time to make this easier.

I think we want to display:
1) original item (e.g. Rectangle, radius, polygon)
2) query.toString() <-- can be different in important ways!
3) how many total documents were wrong
4) info on up to N (say 5) wrong documents:
ID (not lucene docid) of doc.
Lat/Lon location(s) of doc
any relevant metric such as distance from origin
5) GeoTestUtil.toWebGLEarth output of html to visualize those N wrong documents, the query itself, any additional stuff like bounding box that might be useful plotted too.

I think the wrong documents we should try for one-line (rather than many) and we don't need to print stuff like deleted=false since these queries don't do anything sneaky here around that.

---
Migrated from [LUCENE-7189](https://issues.apache.org/jira/browse/LUCENE-7189) by Robert Muir (@rmuir), updated Apr 12 2016

Contributor guide

Open the contributing guide

Research direction

Locate BaseGeoPointTestCase and start by reading how its box, circle, and polygon query tests report failures. Use the requested failure details as the completion checklist: original item, query.toString(), wrong-document count, up to five wrong documents with IDs and locations or metrics, and GeoTestUtil.toWebGLEarth output for visualization.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.