### Elasticsearch Version

8.10

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

unix

### Problem Description

If you try and highlight a `script_score` query that further wraps an `exists` query using the `plain` highlighter, you get a stack trace that looks like this:
```
Caused by: java.lang.UnsupportedOperationException
	at org.apache.lucene.search.highlight.WeightedSpanTermExtractor$DelegatingLeafReader.getFieldInfos(WeightedSpanTermExtractor.java:463) ~[lucene-highlighter-9.6.0.jar:?]
	at org.apache.lucene.search.FieldExistsQuery.rewrite(FieldExistsQuery.java:116) ~[lucene-core-9.6.0.jar:?]
	at org.apache.lucene.search.ConstantScoreQuery.rewrite(ConstantScoreQuery.java:44) ~[lucene-core-9.6.0.jar:?]
	at org.apache.lucene.search.ConstantScoreQuery.rewrite(ConstantScoreQuery.java:44) ~[lucene-core-9.6.0.jar:?]
	at org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:289) ~[lucene-core-9.6.0.jar:?]
	at org.elasticsearch.common.lucene.search.function.ScriptScoreQuery.rewrite(ScriptScoreQuery.java:73) ~[elasticsearch-8.8.2.jar:?]
	at org.apache.lucene.search.highlight.WeightedSpanTermExtractor.extract(WeightedSpanTermExtractor.java:253) ~[lucene-highlighter-9.6.0.jar:?]
	at org.elasticsearch.search.fetch.subphase.highlight.CustomQueryScorer$CustomWeightedSpanTermExtractor.extract(CustomQueryScorer.java:77) ~[elasticsearch-8.8.2.jar:?]
	at org.apache.lucene.search.highlight.WeightedSpanTermExtractor.getWeightedSpanTerms(WeightedSpanTermExtractor.java:533) ~[lucene-highlighter-9.6.0.jar:?]
	at org.apache.lucene.search.highlight.QueryScorer.initExtractor(QueryScorer.java:209) ~[lucene-highlighter-9.6.0.jar:?]
	at org.apache.lucene.search.highlight.QueryScorer.init(QueryScorer.java:178) ~[lucene-highlighter-9.6.0.jar:?]
	at org.apache.lucene.search.highlight.Highlighter.getBestTextFragments(Highlighter.java:173) ~[lucene-highlighter-9.6.0.jar:?]
	at org.elasticsearch.search.fetch.subphase.highlight.PlainHighlighter.highlight(PlainHighlighter.java:151) ~[elasticsearch-8.8.2.jar:?]
	at org.elasticsearch.search.fetch.subphase.highlight.HighlightPhase$1.process(HighlightPhase.java:69) ~[elasticsearch-8.8.2.jar:?]

```

Related to #92919, but as `ScriptScoreQuery` is an elasticsearch query we need to extend `CustomWeightedSpanTermExtractor` to be aware of it.

### Steps to Reproduce

```
POST script-score/_doc
{
  "text": "some text"
}

GET script-score/_search
{
  "query": {
    "script_score": {
      "script": {
        "source": "_score + 1"
      },
      "query": {
        "bool": {
          "must": [
            {
              "match": {
                "text": "some"
              }
            },
            {
              "exists": { "field": "text" }
            }
          ]
        }
      }
    }
  },
  "highlight": {
    "type": "plain",
    "fields": {
      "*": {}
    }
  }
}
```

Returns

```
{
  "error": {
    "root_cause": [
      {
        "type": "unsupported_operation_exception",
        "reason": "unsupported_operation_exception: null"
      }
    ],
    "type": "search_phase_execution_exception",
    "reason": "all shards failed",
    "phase": "query",
    "grouped": true,
    "failed_shards": [
      {
        "shard": 0,
        "index": "script-score",
        "node": "TpI_NouPS1eIgeB4zNzGkg",
        "reason": {
          "type": "unsupported_operation_exception",
          "reason": "unsupported_operation_exception: null"
        }
      }
    ]
  },
  "status": 500
}
```

### Logs (if relevant)

_No response_
test/framework/src/main/java/org/elasticsearch/index/mapper/MapperServiceTestCase.java
return runtimeMapping(b -> {
            b.startObject("field");
            buildField.accept(b);
            b.endObject();
        });
    }
    protected final XContentBuilder runtimeMapping(CheckedConsumer<XContentBuilder, IOException> buildFields) throws IOException {
        XContentBuilder builder = XContentFactory.jsonBuilder().startObject().startObject("_doc").startObject("runtime");
        buildFields.accept(builder);
        return builder.endObject().endObject().endObject();
    }
    private AggregationContext aggregationContext(
        ValuesSourceRegistry valuesSourceRegistry,
        MapperService mapperService,
        IndexSearcher searcher,
        Query query,
        Supplier<SearchLookup> lookupSupplier
    ) {
        return new AggregationContext() {
            private final CircuitBreaker breaker = mock(CircuitBreaker.class);
            @Override
            public IndexSearcher searcher() {
                return searcher;
            }
            @Override
            public Aggregator profileIfEnabled(Aggregator agg) throws IOException {
                return agg;
            }
            @Override
            public boolean profiling() {