diff --git a/src/Query/Compound/FunctionScoreQuery.php b/src/Query/Compound/FunctionScoreQuery.php
index 13beeaf83be0ab537fe47c2c4602be36cf5eecc8..f6199f0743d6f35e6dd7bff2f88e423cadfea608 100644
--- a/src/Query/Compound/FunctionScoreQuery.php
+++ b/src/Query/Compound/FunctionScoreQuery.php
@@ -65,16 +65,14 @@ class FunctionScoreQuery implements BuilderInterface
      */
     public function addFieldValueFactorFunction($field, $factor, $modifier = 'none', BuilderInterface $query = null, $missing = null)
     {
-        $function = array_filter([
-            'field_value_factor' => [
+        $function = [
+            'field_value_factor' => array_filter([
                 'field' => $field,
                 'factor' => $factor,
                 'modifier' => $modifier,
                 'missing' => $missing
-            ],
-        ], function ($item) {
-            return $item !== null;
-        });
+            ]),
+        ];
 
         $this->applyFilter($function, $query);
 
diff --git a/src/Search.php b/src/Search.php
index a427430b6b007d3ba1db5ba368f83ceda46f1a39..404c68a2f2df77cea8a76e5f35902747ed602e57 100644
--- a/src/Search.php
+++ b/src/Search.php
@@ -497,24 +497,6 @@ class Search
         return $this;
     }
 
-    /**
-     * @return bool
-     */
-    public function isTrackTotalHits()
-    {
-        return $this->trackTotalHits;
-    }
-
-    /**
-     * @param bool $trackTotalHits
-     * @return $this
-     */
-    public function setTrackTotalHits(bool $trackTotalHits)
-    {
-        $this->trackTotalHits = $trackTotalHits;
-        return $this;
-    }
-
     /**
      * @return int
      */