protected function addFilterField($index, $name, $field)
    {
        // If field already exists, make sure to merge origin / base fields
        if (isset($index->filterFields[$name])) {
            $field['base'] = $this->mergeClasses(
                $index->filterFields[$name]['base'],
                $field['base']
            );
            $field['origin'] = $this->mergeClasses(
                $index->filterFields[$name]['origin'],
                $field['origin']
            );
        }

        $index->filterFields[$name] = $field;
    }