| This is a followup of a Stackoverflow question. See this comment here: http://stackoverflow.com/questions/37730874/numericrangequery-fails-for-int-field-in-hibernate-search/37731487?noredirect=1#comment62957944_37731487 See NumericFieldUtils#createNumericRangeQuery(). Currently, when we build a range query with the DSL, if the field is defined as a Long but the range parameters are Integers, the query is built as if the field was an Integer and the query does not return any result as Long and Integers are encoded differently. This is not very user friendly: we should build the query with the field type in mind and throw an error if the field type and the range parameters are not compatible. We could be a bit permissive and allow Integers for a Long field type thus allowing above(0) to work for Long too. |