### 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
import org.apache.lucene.index.DocValues;
import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.index.SortedDocValues;
import org.apache.lucene.index.SortedNumericDocValues;
import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.Scorer;
import org.apache.lucene.search.Weight;
import org.apache.lucene.util.Bits;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.BytesRefBuilder;
import org.apache.lucene.util.PriorityQueue;
import org.elasticsearch.cluster.metadata.DataStream;
import org.elasticsearch.index.mapper.DataStreamTimestampFieldMapper;
import org.elasticsearch.index.mapper.TimeSeriesIdFieldMapper;
import org.elasticsearch.search.aggregations.AggregationExecutionContext;
import org.elasticsearch.search.aggregations.BucketCollector;
import org.elasticsearch.search.aggregations.LeafBucketCollector;
import org.elasticsearch.search.sort.SortOrder;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import static org.elasticsearch.index.IndexSortConfig.TIME_SERIES_SORT;
/**
 * An IndexSearcher wrapper that executes the searches in time-series indices by traversing them by tsid and timestamp
 * TODO: Convert it to use index sort instead of hard-coded tsid and timestamp values
 */
public class TimeSeriesIndexSearcher {