Index: web/modules/contrib/elasticsearch_connector/src/Event/QueryParamsEvent.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/Event/QueryParamsEvent.php b/src/Event/QueryParamsEvent.php
--- a/src/Event/QueryParamsEvent.php
+++ b/src/Event/QueryParamsEvent.php
@@ -2,8 +2,40 @@

 namespace Drupal\elasticsearch_connector\Event;

+use Drupal\search_api\Query\Query;
+
 /**
  * Event triggered when search params are built.
  */
 class QueryParamsEvent extends BaseParamsEvent {
+
+  /**
+   * Search Query Object.
+   *
+   * @var Query
+   */
+  protected $query;
+
+  /**
+   * BuildSearchParamsEvent constructor.
+   *
+   * @param string $indexName
+   *   The index name.
+   * @param array $params
+   *   The params.
+   * @param Query $query
+   *    The query object.
+   */
+  public function __construct(string $indexName, array $params, Query $query) {
+    parent::__construct($indexName, $params);
+    $this->query = $query;
+  }
+
+  /**
+   * Get the settings.
+   */
+  public function getQuery(): array {
+    return $this->query;
+  }
+
 }
Index: web/modules/contrib/elasticsearch_connector/src/SearchAPI/Query/QueryParamBuilder.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/SearchAPI/Query/QueryParamBuilder.php b/src/SearchAPI/Query/QueryParamBuilder.php
--- a/src/SearchAPI/Query/QueryParamBuilder.php
+++ b/src/SearchAPI/Query/QueryParamBuilder.php
@@ -171,11 +171,12 @@
     }

     $params['body'] = $body;
+
     // Preserve the options for further manipulation if necessary.
     $query->setOption('ElasticSearchParams', $params);

     // Allow modification of search params via an event.
-    $event = new QueryParamsEvent($indexId, $params);
+    $event = new QueryParamsEvent($indexId, $params, $query);
     $this->eventDispatcher->dispatch($event);
     $params = $event->getParams();

