private function createElasticSearchQuery(array $params, $operator = 'AND')
    {
        $filteredParams = [];
        foreach ($params as $name => $value) {
            if (empty($name) || empty($value)) {
                continue;
            }

            $filteredParams[] = "$name:$value";
        }

        return implode(" $operator ", $filteredParams);
    }
private function createElasticSearchQuery(array $params, $operator = 'AND')
    {
        $filteredParams = [];
        foreach ($params as $name => $value) {
            if (empty($name) || empty($value)) {
                continue;
            }

            $filteredParams[] = "$name:$value";
        }

        return implode(" $operator ", $filteredParams);
    }
private function createElasticSearchQuery ( array $ params , $ operator = 'AND' ) { $ filteredParams = [ ] ; foreach ( $ params as $ name => $ value ) { if ( empty ( $ name ) || empty ( $ value ) ) { continue ; } $ filteredParams [ ] = "$name:$value" ; } return implode ( " $operator " , $ filteredParams ) ; }
Creates an elastic search query from the provided array od parameters.

@param array  $params
@param string $operator

@return string
Creates an elastic search query from the provided array od parameters .