**Build scan:**
https://gradle-enterprise.elastic.co/s/o53eofdiy4zi6/tests/:server:test/org.elasticsearch.search.geo.GeoShapeQueryTests/testRandomGeoCollectionQuery

**Reproduction line:**
`./gradlew ':server:test' --tests "org.elasticsearch.search.geo.GeoShapeQueryTests.testRandomGeoCollectionQuery" -Dtests.seed=1283CBC9A6A14C18 -Dtests.locale=ms-MY -Dtests.timezone=America/Nipigon -Druntime.java=17`

**Applicable branches:**
master

**Reproduces locally?:**
No

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.search.geo.GeoShapeQueryTests&tests.test=testRandomGeoCollectionQuery

**Failure excerpt:**
```
org.elasticsearch.index.mapper.MapperParsingException: failed to parse field [geo] of type [geo_shape]

  at __randomizedtesting.SeedInfo.seed([1283CBC9A6A14C18:7AFEC56AF0829390]:0)
  at org.elasticsearch.index.mapper.AbstractGeometryFieldMapper.lambda$parse$1(AbstractGeometryFieldMapper.java:191)
  at org.elasticsearch.index.mapper.GeoShapeParser.parse(GeoShapeParser.java:44)
  at org.elasticsearch.index.mapper.AbstractGeometryFieldMapper.parse(AbstractGeometryFieldMapper.java:187)
  at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrField(DocumentParser.java:409)
  at org.elasticsearch.index.mapper.DocumentParser.parseObject(DocumentParser.java:460)
  at org.elasticsearch.index.mapper.DocumentParser.innerParseObject(DocumentParser.java:313)
  at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrNested(DocumentParser.java:278)
  at org.elasticsearch.index.mapper.DocumentParser.internalParseDocument(DocumentParser.java:127)
  at org.elasticsearch.index.mapper.DocumentParser.parseDocument(DocumentParser.java:79)
  at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:78)
  at org.elasticsearch.index.shard.IndexShard.prepareIndex(IndexShard.java:999)
  at org.elasticsearch.index.shard.IndexShard.applyIndexOperation(IndexShard.java:948)
  at org.elasticsearch.index.shard.IndexShard.applyIndexOperationOnPrimary(IndexShard.java:892)
  at org.elasticsearch.action.bulk.TransportShardBulkAction.executeBulkItemRequest(TransportShardBulkAction.java:321)
  at org.elasticsearch.action.bulk.TransportShardBulkAction$2.doRun(TransportShardBulkAction.java:187)
  at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
  at org.elasticsearch.action.bulk.TransportShardBulkAction.performOnPrimary(TransportShardBulkAction.java:253)
  at org.elasticsearch.action.bulk.TransportShardBulkAction.dispatchedShardOperationOnPrimary(TransportShardBulkAction.java:133)
  at org.elasticsearch.action.bulk.TransportShardBulkAction.dispatchedShardOperationOnPrimary(TransportShardBulkAction.java:72)
  at org.elasticsearch.action.support.replication.TransportWriteAction$1.doRun(TransportWriteAction.java:211)
  at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:768)
  at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
  at java.lang.Thread.run(Thread.java:833)

  Caused by: java.lang.IllegalArgumentException: at least three non-collinear points required

    at org.apache.lucene.geo.Tessellator.tessellate(Tessellator.java:106)
    at org.apache.lucene.document.LatLonShape.createIndexableFields(LatLonShape.java:86)
    at org.elasticsearch.index.mapper.GeoShapeIndexer$LuceneGeometryIndexer.visit(GeoShapeIndexer.java:129)
    at org.elasticsearch.index.mapper.GeoShapeIndexer$LuceneGeometryIndexer.visit(GeoShapeIndexer.java:61)
    at org.elasticsearch.geometry.Polygon.visit(Polygon.java:84)
    at org.elasticsearch.index.mapper.GeoShapeIndexer$LuceneGeometryIndexer.visit(GeoShapeIndexer.java:81)
    at org.elasticsearch.index.mapper.GeoShapeIndexer$LuceneGeometryIndexer.visit(GeoShapeIndexer.java:61)
    at org.elasticsearch.geometry.GeometryCollection.visit(GeometryCollection.java:51)
    at org.elasticsearch.index.mapper.GeoShapeIndexer.indexShape(GeoShapeIndexer.java:57)
    at org.elasticsearch.index.mapper.GeoShapeFieldMapper.index(GeoShapeFieldMapper.java:198)
    at org.elasticsearch.index.mapper.GeoShapeFieldMapper.index(GeoShapeFieldMapper.java:50)
    at org.elasticsearch.index.mapper.AbstractGeometryFieldMapper.lambda$parse$0(AbstractGeometryFieldMapper.java:187)
    at org.elasticsearch.index.mapper.GeoShapeParser.parse(GeoShapeParser.java:41)
    at org.elasticsearch.index.mapper.AbstractGeometryFieldMapper.parse(AbstractGeometryFieldMapper.java:187)
    at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrField(DocumentParser.java:409)
    at org.elasticsearch.index.mapper.DocumentParser.parseObject(DocumentParser.java:460)
    at org.elasticsearch.index.mapper.DocumentParser.innerParseObject(DocumentParser.java:313)
    at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrNested(DocumentParser.java:278)
    at org.elasticsearch.index.mapper.DocumentParser.internalParseDocument(DocumentParser.java:127)
    at org.elasticsearch.index.mapper.DocumentParser.parseDocument(DocumentParser.java:79)
    at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:78)
    at org.elasticsearch.index.shard.IndexShard.prepareIndex(IndexShard.java:999)
    at org.elasticsearch.index.shard.IndexShard.applyIndexOperation(IndexShard.java:948)
    at org.elasticsearch.index.shard.IndexShard.applyIndexOperationOnPrimary(IndexShard.java:892)
    at org.elasticsearch.action.bulk.TransportShardBulkAction.executeBulkItemRequest(TransportShardBulkAction.java:321)
    at org.elasticsearch.action.bulk.TransportShardBulkAction$2.doRun(TransportShardBulkAction.java:187)
    at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
    at org.elasticsearch.action.bulk.TransportShardBulkAction.performOnPrimary(TransportShardBulkAction.java:253)
    at org.elasticsearch.action.bulk.TransportShardBulkAction.dispatchedShardOperationOnPrimary(TransportShardBulkAction.java:133)
    at org.elasticsearch.action.bulk.TransportShardBulkAction.dispatchedShardOperationOnPrimary(TransportShardBulkAction.java:72)
    at org.elasticsearch.action.support.replication.TransportWriteAction$1.doRun(TransportWriteAction.java:211)
    at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:768)
    at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.lang.Thread.run(Thread.java:833)

```
test/framework/src/main/java/org/elasticsearch/search/geo/GeoShapeQueryTestCase.java
.get();
            assertEquals(0, response.getHits().getTotalHits().value);
            response = client().prepareSearch(defaultIndexName)
                .setQuery(geoShapeQuery(defaultGeoFieldName, collection).relation(ShapeRelation.INTERSECTS))
                .get();
            assertEquals(1, response.getHits().getTotalHits().value);
            response = client().prepareSearch(defaultIndexName)
                .setQuery(geoShapeQuery(defaultGeoFieldName, collection).relation(ShapeRelation.DISJOINT))
                .get();
            assertEquals(0, response.getHits().getTotalHits().value);
        }
        {
            
            List<Geometry> geometries = new ArrayList<>();
            geometries.add(new Point(-20, -30));
            geometries.add(new Point(20, 30));
            GeometryCollection<Geometry> collection = new GeometryCollection<>(geometries);
            SearchResponse response = client().prepareSearch(defaultIndexName)
                .setQuery(geoShapeQuery(defaultGeoFieldName, collection).relation(ShapeRelation.CONTAINS))
                .get();
            assertEquals(0, response.getHits().getTotalHits().value);
            response = client().prepareSearch(defaultIndexName)
                .setQuery(geoShapeQuery(defaultGeoFieldName, collection).relation(ShapeRelation.INTERSECTS))
                .get();
            assertEquals(0, response.getHits().getTotalHits().value);
            response = client().prepareSearch(defaultIndexName)
                .setQuery(geoShapeQuery(defaultGeoFieldName, collection).relation(ShapeRelation.DISJOINT))
                .get();
            assertEquals(1, response.getHits().getTotalHits().value);
        }