protected function getFilterFromFlexForm(array $flexFormConfiguration)
    {
        $filterConfiguration = [];
        $filters = ObjectAccess::getPropertyPath($flexFormConfiguration, 'search.query.filter');

        if (empty($filters)) {
            return $filterConfiguration;
        }

        foreach ($filters as $filter) {
            $filter = $filter['field'];

            $fieldName = $filter['field'];
            $fieldValue = $filter['value'];

            if (!is_numeric($fieldValue)) {
                $fieldValue = '"' . str_replace('"', '\"', $fieldValue) . '"';
            }

            $filterConfiguration[] =  $fieldName . ':' . $fieldValue;
        }
        return $filterConfiguration;
    }