Search api, postprocess processor: how re-run the query? The documentation of the search api module says, about postprocess processor:

Postprocess query
This is probably the rarest phase for processors to
use, postprocessing the query after it has run to manipulate the
search results in some way. A prominent example would be the
&quot;Highlight&quot; processor, which highlights the search keywords in the
returned results. But this phase could also be used, for example, to
re-run the query completely with some changes in case no results were
found the first time.

However, it doesn't explain how to re-run the query completely.
I've to implement exactly in the case described: I've a search api view, with a fulltext search exposed filter and some facets.
If the query returns no results, I need to re-run it with some changes on the conditions provided by one of the facet filters (the content type), before actually rendering the result page.
This must be done programmatically and not by user interaction.
I've checked the ProcessorInterface but the only relative method seems to be the function postprocessSearchResults(ResultSetInterface $results);.
Highligh, the only processor implementing a postprocess_query stage doesn't do anything similar at what I need to do.
Any idea how I could re-run the query? I'm on a D9 site. Alternative solutions to the problem would be useful too, I'm trying this way as the documentation gives the idea it is a possible solution.
I managed to do something, despite not being optimal: in the postprocessSearchResults when necessary I send a RedirectResponse with new search params thus &quot;reloading&quot; the page and &quot;re-running the search.
  /**
 *
 * @SearchApiProcessor(
 *   id = &quot;my_processor&quot;,
 *   label = @Translation(&quot;A label&quot;),
 *   description = @Translation(&quot;A description&quot;),
 *
 *   stages = {
 *     &quot;postprocess_query&quot; = 0,
 *   }
 * )
 */
class MyProcessor extends ProcessorPluginBase {

  //Skipped constructor and boilerplate code

  /**
   * {@inheritdoc}
   */
  public function postprocessSearchResults(ResultSetInterface $results) {
    if ($results-&gt;getResultCount()) {
      return;
    }

    $query = $results-&gt;getQuery();

    if ($query-&gt;getProcessingLevel() != QueryInterface::PROCESSING_FULL) {
      return;
    }

    $request = $this-&gt;requestStack-&gt;getMasterRequest();
    $request_query = $request-&gt;query;
    $sdm_empty_result_automatic_search = $request_query-&gt;has($this-&gt;requestQueryTag) ? $request_query-&gt;get($this-&gt;requestQueryTag) : FALSE;

    /*
     * Necessary to identify between user search and ones run by this class.
     * E.g. if the user is on &quot;article&quot;, and does a new search, it must stay
     * on &quot;articles&quot; if there is any result.
     * However if there are no results, the class must redirect to the fist
     * content type and so on until all are searched
     *
     */
    $next_type_value = NULL;
    $condition_type_value = $this-&gt;sdmSearchQueryHelper-&gt;queryGetConditionValue($query);
    switch ($condition_type_value) {
      case 'prodotto':
        $next_type_value = 'scheda_espositore';
        $sdm_empty_result_automatic_search = TRUE;
        break;
      case 'scheda_espositore':
        $next_type_value = $sdm_empty_result_automatic_search ? 'article' : 'prodotto';
        break;
      case 'article':
        $next_type_value = $sdm_empty_result_automatic_search ? NULL : 'prodotto';
        break;
    }

    if (empty($next_type_value)) {
      return;
    }

    $query_params = [
      'search_api_fulltext' =&gt; $query-&gt;getOriginalKeys(),
      'sort_by' =&gt; 'title',
      'f' =&gt; ['content_type:' . $next_type_value],
    ];

    if ($sdm_empty_result_automatic_search) {
      $query_params[$this-&gt;requestQueryTag] = $this-&gt;requestQueryTag;
    }

    $response = new RedirectResponse(Url::fromRoute('&lt;current&gt;', [], ['query' =&gt; $query_params])
      -&gt;toString());
    $response-&gt;send();

     /**
     * todo
     * can't use the following logic but had to do all the previous because I have overriden the default url_processor,
     * so there is always a &quot;default&quot; content type if none is selected.
      * So unfortunately I can't run a generic query to search for all the results.
      * For a &quot;standard&quot; search implementation the following one could be a good starting point
     */
    /*
    $original_query = $query-&gt;getOriginalQuery();
    $original_query-&gt;addTag($this-&gt;queryTag);
    $this-&gt;sdmSearchQueryHelper-&gt;addConditionToQuery($original_query, 'facet:type', ['type' =&gt; 'scheda_espositore']);
    $results = $original_query-&gt;execute();

    $items = $results-&gt;getResultItems();
    $iterator = $results-&gt;getIterator();
    */

  }