@Test
    void testRadiusUnits() {
        Query q = new Query();
        q.properties().set("pos.ll", "N0;E0");
        q.properties().set("pos.radius", "2km");
        doSearch(searcher, q, 0, 10);
        assertEquals("(2,0,0,18026,0,1,0,4294967295)", q.getRanking().getLocation().toString());

        q = new Query();
        q.properties().set("pos.ll", "N0;E0");
        q.properties().set("pos.radius", "2000m");
        doSearch(searcher, q, 0, 10);
        assertEquals("(2,0,0,18026,0,1,0,4294967295)", q.getRanking().getLocation().toString());

        q = new Query();
        q.properties().set("pos.ll", "N0;E0");
        q.properties().set("pos.radius", "20mi");
        doSearch(searcher, q, 0, 10);
        assertEquals("(2,0,0,290112,0,1,0,4294967295)", q.getRanking().getLocation().toString());

        q = new Query();
        q.properties().set("pos.ll", "N0;E0");
        q.properties().set("pos.radius", "2km");
        q.properties().set("pos.units", "udeg");
        doSearch(searcher, q, 0, 10);
        assertEquals("(2,0,0,18026,0,1,0,4294967295)", q.getRanking().getLocation().toString());

        q = new Query();
        q.properties().set("pos.ll", "N0;E0");
        q.properties().set("pos.radius", "-42");
        doSearch(searcher, q, 0, 10);
        assertEquals("(2,0,0,-1,0,1,0,4294967295)", q.getRanking().getLocation().toString());
        assertEquals("(2,0,0,-1,0,1,0,4294967295)", q.getRanking().getLocation().backendString());
    }
Tests different ways of specifying the radius.
container-search/src/test/java/com/yahoo/prelude/searcher/test/PosSearcherTestCase.java