### Elasticsearch Version

8.1.0 (also seen since 7.15.1)

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

Darwin Kernel Version 21.3.0

### Problem Description

Attempting to upload data in a CSV format via the file data visualizer  fails with a 408 error against `/internal/file_data_visualizer/analyze_file` 

This is caused by a too-long regex that when running a string match results in an error ending with "stack overflow".

The default limit on mappings per index is 1000. So the structure finder should also limit mappings to the first 1000 fields.

### Steps to Reproduce

Navigate to Kibana UI file data visualizer and attempt to upload CSV with 1900 > columns.

### Logs (if relevant)

_No response_
x-pack/plugin/text-structure/src/test/java/org/elasticsearch/xpack/textstructure/structurefinder/DelimitedTextStructureFinderTests.java
assertNull(structure.getHasByteOrderMarker());
        } else {
            assertEquals(hasByteOrderMarker, structure.getHasByteOrderMarker());
        }
        assertEquals("""
            ^"?pos_id"?,"?trip_id"?,"?latitude"?,"?longitude"?,"?altitude"?,"?timestamp"?""", structure.getExcludeLinesPattern());
        assertNull(structure.getMultilineStartPattern());
        assertEquals(Character.valueOf(','), structure.getDelimiter());
        assertEquals(Character.valueOf('"'), structure.getQuote());
        assertTrue(structure.getHasHeaderRow());
        assertNull(structure.getShouldTrimFields());
        assertEquals(Arrays.asList("pos_id", "trip_id", "latitude", "longitude", "altitude", "timestamp"), structure.getColumnNames());
        assertNull(structure.getGrokPattern());
        assertEquals("timestamp", structure.getTimestampField());
        assertEquals(Collections.singletonList("YYYY-MM-dd HH:mm:ss.SSSSSS"), structure.getJodaTimestampFormats());
        assertEquals(Collections.singleton("properties"), structure.getMappings().keySet());
    }
    public void testCreateConfigsGivenTsvWithSyslogLikeTimestamp() throws Exception {
        String sample = """
            Latitude\tLongitude\tloc\tTimestamp
            25.78042\t18.441196\t"25.7804200000,18.4411960000"\tJun 30 2019 13:21:24
            25.743484\t18.443047\t"25.7434840000,18.4430470000"\tJun 30 2019 06:02:35
            25.744583\t18.442783\t"25.7445830000,18.4427830000"\tJun 30 2019 06:02:35
            25.754593\t18.431637\t"25.7545930000,18.4316370000"\tJul 1 2019 06:02:43
            25.768574\t18.433483\t"25.7685740000,18.4334830000"\tJul 1 2019 06:21:28
            25.757736\t18.438683\t"25.7577360000,18.4386830000"\tJul 1 2019 12:06:08
            25.76615\t18.436565\t"25.7661500000,18.4365650000"\tJul 1 2019 12:06:08
            25.76896\t18.43586\t"25.7689600000,18.4358600000"\tJul 1 2019 12:13:50
            25.76423\t18.43705\t"25.7642300000,18.4370500000"\tJul 1 2019 12:39:10
            """;