lib/Elastica/Index/Settings.php
public function setMergePolicy(string $key, string $value): Response
    {
        $this->_index->close();
        $response = $this->set(['merge.policy.'.$key => $value]);
        $this->_index->open();

        return $response;
    }
public function setMergePolicy(string $key, string $value): Response
    {
        $this->_index->close();
        $response = $this->set(['merge.policy.'.$key => $value]);
        $this->_index->open();

        return $response;
    }
public function setMergePolicy ( string $ key , string $ value ) : Response { $ this -> _index -> close ( ) ; $ response = $ this -> set ( [ 'merge.policy.' . $ key => $ value ] ) ; $ this -> _index -> open ( ) ; return $ response ; }
Sets the specific merge policies.

To have this changes made the index has to be closed and reopened

@param string $key   Merge policy key (for ex. expunge_deletes_allowed)
@param string $value

@return Response

@see https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-merge.html
Sets the specific merge policies .