public function getFields()
    {
        $fields = array();
        if (isset($this->definition['index'])) {
            $fields[] = $this->getIndex();
        }
        if (isset($this->definition['fields'])) {
            foreach ($this->definition['fields'] as $key => $value) {
                if (!is_numeric($key)) {
                    $fields[] = $key;
                } else {
                    $fields[] = $value;
                }
            }
        }
        return $fields;
    }