Before upgrading to Hibernate Search 5 from version 4.5, our system indexed all document ID's as numeric fields:
@Entity
public class Staff {
@Id
@NumericField
protected Long id;
// other fields
}
This allowed us to use numeric range queries. In Hibernate 5, all document IDs are indexed as strings, and the above annotation causes an exception. Without the annotation, all numeric range queries fail to properly search the ID fields.
Switching to TermRangeQuery instead of NumericRangeQuery will be tedious, and I'm hoping to avoid this.
Is there a way to continue treating IDs as numeric values?