**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
queryGeometries.add(polygon);
        GeometryCollection<Geometry> queryCollection = new GeometryCollection<>(queryGeometries);
        GeoShapeQueryBuilder geoShapeQueryBuilder = QueryBuilders.geoShapeQuery(defaultGeoFieldName, queryCollection);
        geoShapeQueryBuilder.relation(ShapeRelation.INTERSECTS);
        SearchResponse result = client().prepareSearch(defaultIndexName).setQuery(geoShapeQueryBuilder).get();
        assertSearchResponse(result);
        assertTrue("query: " + geoShapeQueryBuilder + " doc: " + Strings.toString(docSource), result.getHits().getTotalHits().value > 0);
    }
    
    public void testEnvelopeSpanningDateline() throws Exception {
        createMapping(defaultIndexName, defaultGeoFieldName);
        ensureGreen();
        String doc1 = """
            {
              "geo": {
                "coordinates": [ -33.918711, 18.847685 ],
                "type": "Point"
              }
            }""";
        client().index(new IndexRequest(defaultIndexName).id("1").source(doc1, XContentType.JSON).setRefreshPolicy(IMMEDIATE)).actionGet();
        String doc2 = """
            {
              "geo": {
                "coordinates": [ -49, 18.847685 ],
                "type": "Point"
              }
            }""";
        client().index(new IndexRequest(defaultIndexName).id("2").source(doc2, XContentType.JSON).setRefreshPolicy(IMMEDIATE)).actionGet();
        String doc3 = """
            {