### Description

Currently, `text_expansion` queries are limited to using rank_features field types.

As we [brought back sparse_vector](https://github.com/elastic/elasticsearch/issues/98104) field type, we want text_expansion queries to be able to work with `sparse_vector` fields as well.

`rank_features` field type should keep being usable in `text_expansion` queries. We don't want to deprecate until the UI and clients that set this up are ready to migrate to `sparse_vector`.
x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration/TextExpansionQueryIT.java
/*
 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the Elastic License
 * 2.0; you may not use this file except in compliance with the Elastic License
 * 2.0.
 */
package org.elasticsearch.xpack.ml.integration;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.ResponseException;
import org.elasticsearch.core.Strings;
import org.elasticsearch.xpack.core.ml.utils.MapHelper;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Base64;
import java.util.List;
import java.util.Map;
import static org.hamcrest.Matchers.containsString;
/**
 * This test uses a tiny token weight model to simulate a trained
 * NLP model. The output is an array the size of the highest value
 * input ID and all tokens have a weight of 1.0.
 *