### Elasticsearch Version

master

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

all

### Problem Description

TimeSeriesIndexSearcher use the tsidOrd to speed up tsid compare. There is a hidden bug:
The init value of tsidOrd is 0, so it's ok to collect data from beginning. But if collect data from the middle, the tsidOrd has a wrong init value. It will cause the PriorityQueue pop the wrong LeafWalker.

### Steps to Reproduce

Create 2 segments IndexWriter, And the first segment is:
|_tsid|@timestamp|
|  ----  | ----  |
|tsid1|1|
|tsid2|11|
|tsid2|10|
|tsid3|1|

 the second segment is:
|_tsid|timestamp|
|  ----  | ----  |
|tsid1|1|
|tsid2|21|
|tsid2|20|
|tsid3|1|

the query is _tsid : tsid2 OR _tsid : tsid3
the current order is : tsid2/21 -> tsid2/11 -> tsid2/20 -> tsid2/10 -> tsid3/1  -> tsid3/1.
The right order is :  tsid2/21 -> tsid2/20 -> tsid2/11 -> tsid2/10 -> tsid3/1  -> tsid3/1.
The reason is in
```
        boolean shouldPop() throws IOException {
            if (tsidOrd == -1) {
                tsidOrd = tsids.ordValue();
            } else if (tsidOrd != tsids.ordValue()) {
                tsidOrd = tsids.ordValue();
                return true;
            }
            return false;
        }
```
the tsidOrd init value is 0, But the first tsidOrd value of this query is 1. So It pop the second segment unexpected.

### Logs (if relevant)

_No response_
server/src/main/java/org/elasticsearch/search/aggregations/timeseries/TimeSeriesIndexSearcher.java
private static final int CHECK_CANCELLED_SCORER_INTERVAL = 1 << 11;
    
    
    private final IndexSearcher searcher;
    private final List<Runnable> cancellations;
    private final boolean tsidReverse;
    private final boolean timestampReverse;
    public TimeSeriesIndexSearcher(IndexSearcher searcher, List<Runnable> cancellations) {
        this.searcher = searcher;
        this.cancellations = cancellations;
        assert TIME_SERIES_SORT.length == 2;
        assert TIME_SERIES_SORT[0].getField().equals(TimeSeriesIdFieldMapper.NAME);
        assert TIME_SERIES_SORT[1].getField().equals(DataStreamTimestampFieldMapper.DEFAULT_PATH);
        this.tsidReverse = TIME_SERIES_SORT[0].getOrder() == SortOrder.DESC;
        this.timestampReverse = TIME_SERIES_SORT[1].getOrder() == SortOrder.DESC;
    }
    public void search(Query query, BucketCollector bucketCollector) throws IOException {
        int seen = 0;
        query = searcher.rewrite(query);
        Weight weight = searcher.createWeight(query, bucketCollector.scoreMode(), 1);
        
        List<LeafWalker> leafWalkers = new ArrayList<>();
        for (LeafReaderContext leaf : searcher.getIndexReader().leaves()) {
            if (++seen % CHECK_CANCELLED_SCORER_INTERVAL == 0) {
                checkCancelled();
            }