LPS-39809

Hi,

I'm Andrea Di Giorgi from SMC Treviso, Italy. Nice to talk with you for the first time! :-)

While working on an "Advanced Search" portlet, I encountered the problem described in LPS-39809: I needed to search for file entries using a range for a "ddm-integer" field as criteria. These fields are indexed as integer, while `LuceneHelperImpl` treats them as long (creating a `NumericRangeQuery` with the `newLongRange` method), and so no results were returned. I think it's more correct to call the appropriate `NumericRangeQuery` method, depending on the number type. Because you are the core maintainer of the Search framework, I'm sending you this PR with a possible solution.

If you want, I can also give you the code I wrote to reproduce this problem.

Best regards,
Andrea


PS: sorry if I added my name as "author"! I haven't figured out the policy for it yet :-D