Added control which fields can be used for ordering.

Fixes #199.