gerlowskija opened a new pull request, #4229:
URL: https://github.com/apache/solr/pull/4229

   # Description
   
   We recently added Solr field types "IntRangeField" and "LongRangeField" to 
allow users to index and search integer and long ranges (e.g. prices, business 
hours, grade ranges).  But not everything is an int/long.  Lucene has 
additional "range" types: `DoubleRange`, and `FloatRange`.
   
   This PR tackles exposing `FloatRange` in Solr as `FloatRangeField`.  This is 
ideal for things that may not fit as a standard "whole number".
   
   # Solution
   
   This approach takes a very similar approach to that taken by #4192.  
AbstractNumericRangeFieldType contains most of the plumbing common to these 
"range" types, so the new implementation added by this PR `FloatRangeField` 
contains only that code that differs from its base/parent class.
   
   The main difference between FloatRangeField and the pre-existing 
IntRangeField and LongRangeField is the value parsing, which accepts floating 
point values that (e.g. `3.14`) that would be rejected as bounds in an 
IntRangeField.
   
   # Tests
   
   FloatRangeFieldTest has unit tests for the new functionality, with more 
"integration" functionality tested in NumericRangeQParserPluginFloatTest.  Both 
of these test classes borrow heavily from their int and long counterparts.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [x] I have reviewed the guidelines for [How to 
Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) and my 
code conforms to the standards described there to the best of my ability.
   - [x] I have created a Jira issue and added the issue ID to my pull request 
title.
   - [x] I have given Solr maintainers 
[access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork)
 to contribute to my PR branch. (optional but recommended, not available for 
branches on forks living under an organisation)
   - [x] I have developed this patch against the `main` branch.
   - [x] I have run `./gradlew check`.
   - [x] I have added tests for my changes.
   - [ ] I have added documentation for the [Reference 
Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   - [ ] I have added a [changelog 
entry](https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc) for my 
change
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to