 geo_point field does not support GeoJson which can be a PITA if your data is in such a format. Indexing it as a geo_shape is an option but very wasteful.
test/framework/src/main/java/org/elasticsearch/search/geo/GeoPointShapeQueryTestCase.java
assertEquals(2, searchHits.getTotalHits().value);
        assertNotEquals("3", searchHits.getAt(0).getId());
        assertNotEquals("3", searchHits.getAt(1).getId());
    }
    public void testWithInQueryLine() throws Exception {
        createMapping(defaultIndexName, defaultGeoFieldName);
        ensureGreen();
        Line line = new Line(new double[] { -25, -35 }, new double[] { -25, -35 });
        try {
            client().prepareSearch(defaultIndexName)
                .setQuery(QueryBuilders.geoShapeQuery(defaultGeoFieldName, line).relation(ShapeRelation.WITHIN))
                .get();
        } catch (SearchPhaseExecutionException e) {
            assertThat(e.getCause().getMessage(), containsString("Field [" + defaultGeoFieldName + "] found an unsupported shape Line"));
        }
    }
    public void testQueryWithinMultiLine() throws Exception {
        createMapping(defaultIndexName, defaultGeoFieldName);
        ensureGreen();
        Line lsb1 = new Line(new double[] { -35, -25 }, new double[] { -35, -25 });
        Line lsb2 = new Line(new double[] { -15, -5 }, new double[] { -15, -5 });
        MultiLine multiline = new MultiLine(List.of(lsb1, lsb2));
        try {
            client().prepareSearch(defaultIndexName)
                .setQuery(QueryBuilders.geoShapeQuery(defaultGeoFieldName, multiline).relation(ShapeRelation.WITHIN))
                .get();
        } catch (SearchPhaseExecutionException e) {
            assertThat(e.getCause().getMessage(), containsString("Field [" + defaultGeoFieldName + "] found an unsupported shape Line"));
        }
    }