public function getValue($object, FieldInterface $field)
    {
        try {
            switch (get_class($field)) {
                case 'Massive\Bundle\SearchBundle\Search\Metadata\Field\Property':
                    return $this->getPropertyValue($object, $field);
                case 'Massive\Bundle\SearchBundle\Search\Metadata\Field\Expression':
                    return $this->getExpressionValue($object, $field);
                case 'Massive\Bundle\SearchBundle\Search\Metadata\Field\Field':
                    return $this->getFieldValue($object, $field);
                case 'Massive\Bundle\SearchBundle\Search\Metadata\Field\Value':
                    return $field->getValue();
            }
        } catch (\Exception $e) {
            throw new \Exception(sprintf(
                'Error encountered when trying to determine value from object "%s"',
                get_class($object)
            ), null, $e);
        }

        throw new \RuntimeException(sprintf(
            'Unknown field type "%s" when trying to convert "%s" into a search document',
            get_class($field),
            get_class($object)
        ));
    }