@avaris so something like:
```python
try:
    index.sort(key=attrgetter(order_by))
except AttributeError:
    logger.error('There is no "{}" attribute in the metadata for "{}"'.format(order_by, slug))
```