When using Lucene's SortField.Type.INT to sort on a field which was not indexed as a NumericField, the resulting error message is confusing:
Wondering if we could improve on that, as this might be a migration issue: it seems previously - before Lucene 5 - this was more lenient (probably gave the wrong sort order, but it would not throw an exception).
A starting point it the test org.hibernate.search.test.sorting.SortingTest (about to be committed).
The opposite problem will result in something like:
I suspect in this case the field was indexed as NumericField, but it's being queried as SortField.Type.STRING